-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Assets (scripts) double loading #2678
Comments
In this issue #2672 I had a workaround with not using lazy components |
Lazy loading works, but the component is loaded twice. Maybe this is how it should be, I don't know. In development mode, the component is loaded once. |
Can confirm this still happens in Vite 2.8.6, plugin-vue 2.2.4 |
This only happens when I think this part is affecting.
|
Describe the bug
When we use code splitting via dynamic import like this:
const routes = [
...
component: () => import('Projects.vue')
...
And we go to the page "Projects" app loaded component twice with different referers in production build.
Reproduction
https://github.com/miirinjej/vite-assets-double-loading
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager:
npm
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: