-
Hi everyone, I recently upgraded all the packages in my Vue codebase, carefully followed each migration guide, and fixed every TypeScript error. The dev server runs fine, but when I run a production build it consistently fails during chunk generation. Here’s the output:
This is my vite.config.mts
I can’t figure out where this duplicate declaration is coming from... Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @iolk! Looks like a minification conflict. Try adding That |
Beta Was this translation helpful? Give feedback.
-
Hello, this issue is actually caused by the upgrade of the plugin rollup referenced by Vite, rollup@4.50.1 This error will occur, and if it is @ 4.50.0 or earlier versions, it should be normal. You can try manually installing versions 4.50.0 or earlier to verify this issue. Because I have encountered the same problem as you. Vite should specify the dependent version based on its own version, which can prevent the upgrade of its dependent packages from causing problems that appear to be with the Vite version. Also, we need to wait for Rollup to release a patch version as soon as possible to fix this issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for taking the time to help! @vofronte your tip about disabling minification is super useful for debugging, I’ll remember that. @fashion98 thanks for pointing out the Rollup version issue, it fixed the problem. I’ll lock it to 4.50.0 for now and watch for the patch release. Really appreciate both of your suggestions! |
Beta Was this translation helpful? Give feedback.
Hello, this issue is actually caused by the upgrade of the plugin rollup referenced by Vite, rollup@4.50.1 This error will occur, and if it is @ 4.50.0 or earlier versions, it should be normal. You can try manually installing versions 4.50.0 or earlier to verify this issue. Because I have encountered the same problem as you. Vite should specify the dependent version based on its own version, which can prevent the upgrade of its dependent packages from causing problems that appear to be with the Vite version. Also, we need to wait for Rollup to release a patch version as soon as possible to fix this issue.