PR #6251 generates a HUGE `async-vendor` chunk dispite the packages are imported from different async chunks
See original GitHub issueDescribe the bug
PR #6251 introduced a separate chunk for async imports to improve cache hits which is great to have.
The problem is it generates a single chunk for all async imports, which results in all packages imported async-ly to be packed into one huge(in my case >1MB) file.
I think it should be at least keyed chunks so packages from different async chunks will be written separately.
vite v2.7.7:
vite v2.7.8:
Reproduction
https://github.com/QiroNT/vite-reps/tree/vite-6251
System Info
System:
OS: Linux 5.14 Manjaro Linux
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 12.65 GB / 31.30 GB
Container: Yes
Shell: 5.1.12 - /bin/bash
Binaries:
Node: 17.3.0 - ~/.local/share/pnpm/node
npm: 8.3.0 - ~/.local/share/pnpm/npm
Browsers:
Firefox: 95.0.1
npmPackages:
@vitejs/plugin-vue: ^2.0.1 => 2.0.1
vite: ^2.7.8 => 2.7.8
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- 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.
- 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.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Paper 1.13 - Async Chunks and World Conversion fix - Reddit
In Vanilla, and in 1.13, all of this happens on the servers main thread every time a chunk loaded. What if that chunk...
Read more >Level sensor PanCake® PR 6251 - Minebea Intec
The PR 6251 fill-level sensor is specially designed for basic weighing of silos and horizontal tanks.
Read more >fix(css): convert map returned by vite:css transform to SourceMap ...
Before submitting the PR, please make sure you do the following ... vite pR #6251 generates a HUGE `async-vendor` chunk dispite the packages...
Read more >failed to parse the VMAS ID - Error syncing load balancer
PR #6251 generates a HUGE `async-vendor` chunk dispite the packages are imported from different async chunks, 6, 2021-12-28, 2022-07-21.
Read more >vite - bytemeta
PR #6251 generates a HUGE `async-vendor` chunk dispite the packages are imported from different async chunks. jerryYuX.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay,i will propose a more specific splitting strategy for async chunk and create a pr again.
vite@2.7.9 was released with #6251 reverted It was too big of a change for a patch release, @sanyuan0704 please create another PR addressing this issue and we can work it out for inclusion in a future minor