Skip to content
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

hash of the main chunk not changed when only modify dynamic sub component css code #9583

Closed
7 tasks done
den9yon9 opened this issue Aug 8, 2022 · 2 comments · Fixed by #11475
Closed
7 tasks done
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@den9yon9
Copy link

den9yon9 commented Aug 8, 2022

Describe the bug

I changed some css code of dynamic module, then I run this build script, I found this hash of the main chunk does not change

image

[-Ie=Du.exports.jsx,gt=Du.exports.jsxs,Dd=lt.exports.lazy(()=>Pd(()=>import("./Home.4435181a.js"),["assets/Home.4435181a.js","assets/Home.644c3273.css"]));function-]{+Ie=Du.exports.jsx,gt=Du.exports.jsxs,Dd=lt.exports.lazy(()=>Pd(()=>import("./Home.4435181a.js"),["assets/Home.4435181a.js","assets/Home.a7afbb62.css"]));function+}

Reproduction

https://stackblitz.com/edit/vitejs-vite-wwrljy?file=main.js

System Info

System:
    OS: Linux 4.4 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 7.28 GB / 15.89 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
 Binaries:
    Node: 14.19.3 - ~/.local/share/pnpm/node
    Yarn: 1.22.17 - ~/.local/share/pnpm/yarn
    npm: 6.14.17 - ~/.local/share/pnpm/npm
 npmPackages:
    @vitejs/plugin-react: ^2.0.0 => 2.0.0
    vite: ^3.0.0 => 3.0.4

Used Package Manager

pnpm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Dec 10, 2022

Looks like this still happens in Vite 4. We need to make sure the hash of sub.js depends on sub.css too, which should make the hash change cascade.

@tessro
Copy link

tessro commented Dec 17, 2022

We ran into this today and it caused a production issue that required an emergency rollback. It feels higher severity than p3-minor-bug, no?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants