-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Builds are non-deterministic #11911
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
Comments
The
Is this as expected? |
Yep, that's expected |
Two same css chunks will generate the same source code hash. Rollup has a The problem happens due to the I see two options:
|
If I understand your comment correctly, this could happen without Vite. I think it would be great if we can provide a reproduction (or a simplified repo that demonstrates the problem) and create a issue in rollup. |
A simplified repo is here: https://stackblitz.com/edit/vitejs-vite-acbane?file=src%2Fdom2%2Findex.ts,src%2Fdom1%2Findex.ts,src%2Findex.ts,vite.config.ts,src%2Fdom1%2Fdom1.css,build.js,package.json,src%2Fdom2%2Fdom2.css,_gitignore&terminal=dev repro step:
|
@sun0day Thanks! I created a issue to rollup to discuss whether this can be fixed in rollup. |
Reopening as the PR was partially reverted in rollup. My thoughts: rollup/rollup#4919 (comment) |
Fixed in #12558 |
Describe the bug
Running
vite build
twice can, in some circumstances, result in different chunking. Unfortunately the only repro I have uses SvelteKit (it comes from sveltejs/kit#8291) — I haven't been able to simplify it further.Reproduction
https://github.com/Rich-Harris/vite-non-deterministic-build-repro
Steps to reproduce
git clone [email protected]:Rich-Harris/vite-non-deterministic-build-repro.git
cd vite-non-deterministic-build-repro
pnpm i
pnpm test
pnpm test
pnpm test
pnpm test
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: