-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Code splitting ineffective due to vendor chunk #3731
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Description
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
System Info
Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:
❯ npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
npx: installed 1 in 0.877s
System:
OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 11.85 GB / 30.99 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Browsers:
Chrome: 91.0.4472.77
Firefox: 89.0
npmPackages:
vite: ^2.3.7 => 2.3.Used package manager: yarn
Logs
See repro
Before submitting the issue, please make sure you do the following
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Provide a description in this issue that describes the bug.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)