This is a monorepo designed to test support for ES6 modules when deploying to Vercel.
- Deploy this repo with
/main
as the root directory. - After deployment, visit
{deployment_url}/api/cjs
. This will work. - Visit
{deployment_url}/api/mjs
. This does not work. The only difference between the two packages is that one is written in CommonJS and the other using ES6 modules (declared as"type": "module"
in its package.json file)
- Deploy this repo with
/mjs
as the root directory. - Visiting
{deployment_url}/api
will work. - Run locally, using
vercel dev
. Visitinglocalhost:3000/api
will not work.