New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite 5 / Rollup 4 build warning in v2.6.0 #2269
Comments
@himself65 Was |
Might be. I was worried about this before |
Here is the minimum reproduction https://stackblitz.com/edit/vitejs-vite-v2qh9v?file=src%2Fmain.ts |
@Kamahl19 Hi, would you try to use https://github.com/huozhi/rollup-plugin-swc-preserve-directives to see if the error disappear |
I get even more errors. Maybe I misunderstood. Should I just add it to the vite plugin? |
Could you please share you vite config? |
I just tried, and there's only one warning that won't cause building interrupt.
|
This comment was marked as outdated.
This comment was marked as outdated.
Can this be an upstream issue? |
Any updates on this? Anyone? |
Error is still here https://stackblitz.com/edit/vitejs-vite-v2qh9v ~/projects/vitejs-vite-v2qh9v 2s
❯ npm run build
> [email protected] build
> tsc && vite build
vite v5.1.4 building for production...
node_modules/jotai/esm/react.mjs (1:0) Module level directives cause errors when bundled, "use client" in "node_modules/jotai/esm/react.mjs" was ignored.
✓ 12 modules transformed.
dist/index.html 0.38 kB │ gzip: 0.27 kB
dist/assets/index-Kr26tfIY.js 7.35 kB │ gzip: 3.07 kB
✓ built in 462ms
|
Related vitejs/vite#15012 (comment) |
thanks. btw, it's not "error" that stops building, but just "warning", correct? |
oh yeah, a warning |
The combination of upgrading to Vite 5 (Rollup 4) and Jotai 2.6.0 results in an error during building
This error does not happen in 2.5.1 and also does not happen in Vite 4 + Jotai 2.6.0.
The text was updated successfully, but these errors were encountered: