question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PR #6251 generates a HUGE `async-vendor` chunk dispite the packages are imported from different async chunks

See original GitHub issue

Describe 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
sanyuan0704commented, Dec 28, 2021

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

Okay,i will propose a more specific splitting strategy for async chunk and create a pr again.

2reactions
patak-devcommented, Dec 28, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found