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
CSS output name will change when import large css from node_modules #12256
Comments
Start a new pull request in StackBlitz Codeflow. |
I found another problem: similar to #11911, this reprodution will generate non-deterministic css files in a certain chance due to the |
I know, people like to use
That is why we encounter this issue. Rollup's chunk name config option gives only Ideally, Vite or rollup can do first-come-first-take. If index has been taken by a chunk, next trunk have to check for parent directory for a different name. As a result:
Much better than:
|
I'll close this issue as a duplicate of #11911 and rollup/rollup#4858. |
Describe the bug
In my case, HTML and assets are from different servers. So I configured vite to always generate
build/index.css
. When doing code spliting, Vite will nicely output:However, when I imported some large css, like this:
The css output changed to:
HTML output:
Reproduction
https://stackblitz.com/edit/vitejs-vite-dxxltr?file=build/index.html
Steps to reproduce
npm run build
and checkbuild/index.html
. It importsbuild/index3.css
.import 'bootstrap/dist/css/bootstrap.css';
frommain.js
.npm run build
and checkbuild/index.html
. It importsbuild/index.css
.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: