-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support for Nitro/ESM Build #1144
Comments
same problem |
Hey @wattanx 👋 Couldn't it be solved by renaming module.exports = require("./server.js") |
The solution to this problem is simple. There are currently two methods (choose one):
It will be more annoying to continue using webpack. Adding packages that need to be translated depends on how many incompatible esm modules you rely on. vite is a one-time solution, but vite has a disadvantage that it cannot extract css 👉 #1287 |
There is another way to use esbuild-loader for webpack configuration, but you need to configure a lot of things manually. I used it initially and it worked. |
Yeah the plan is to enable Vite asap but I need to update some other packages first and Nitro needs to be enabled anyway so I wanted to enable Nitro in one PR and Vite in another. |
Environment
Nuxt bridge
yarn dev
Reproduction
https://stackblitz.com/edit/github-3fgb91-hpgsnm
Describe the bug
Enabling nitro in the bridge options together with having
type="module"
in the package.json causes the application to break with the message:Additional context
Our team is in progress of migrating a nuxt2 project to nuxt3 with the help of nuxt/bridge and we are enabling features step by step
Logs
The text was updated successfully, but these errors were encountered: