-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Code splitting ineffective due to vendor chunk #3731
Comments
This seems to only happen because |
You can disable it by setting |
for mi this just makes some manual chunks to be included on the main vendor. To be honest, what ends on the vendor bundle is really surprising to me almost all the times. I am doing lazy loading of routes, components and even libraries and a lot of things that I don't expect ends on the main vendor bundle. Many times if a library is lazy-loaded from more than one place it is also included on the vendor bundle. |
Describe the bug
I use framer-motions m component to lazyload most of the library, however due to the default options of Vite this is entirely ineffective since all of framer-motion ends up in the immediately loaded vendor bundle anyway. By disabling the rollup option manualChunks the code is splitted up as expected.
Reproduction
https://github.com/Pajn/vite-code-split-repro
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: yarn
Logs
See repro
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: