-
With a very simple config, vite 3 bundle size is 6 times bigger than vite 2. Any other config to make the bundle size smaller?
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
It is best to provide a simple demo. |
Beta Was this translation helpful? Give feedback.
-
Here you go. https://github.com/pwang2/test-bundle A further look reveals it is because I will move this to unplugin-icons project instead. Sorry about the noise it created. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you @chenxch. Should have read the migration log first. |
Beta Was this translation helpful? Give feedback.
By comparing the code, you will find that the file compiled by the vite3 version has become larger because it retains the variable judgment code that should be excluded from the original compilation. Check the document and find that the following changes have been made:
Migration from v2
process.env.*
is now preserved in library mode