-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
manifest.json does not contain css files imported by js entry points any more #15161
Comments
Yes, this is an intentional change. First, the CSS file entry in the top-level object had the wrong key name. Instead of the original file name, it had the filename importing the CSS with So there's two options you can take.
|
It looks like we didn't document #14945 in the migration guide, maybe we can touch on it under the advanced section to clear things up. |
Yes, mentioning that in the migration guide would actually help a lot.
I'm aware of these options, but thanks for clearing that up. For the not so common use case to need both (separate injection and corresponding injection), a backend integration still can access the css file for a js entry point from the manifest. Feel free to close once the migration guide is updated. |
Fix for the breaking change introduced by vitejs/vite#15161
Describe the bug
In Vite 4, the manifest file contained CSS files that were imported in a JS entry point. In Vite 5 this is not the case any more.
To illustrate the changes in manifest.json generation I created a minimal project.
This change breaks my backend integration with vite, as I need to find the css file that is related to JS entry point separately.
Reproduction
https://github.com/helhum/vite-manifest/
Steps to reproduce
npm install followed by npm run build
System Info
System: OS: macOS 13.6 CPU: (10) arm64 Apple M1 Pro Memory: 89.02 MB / 32.00 GB Shell: 5.2.15 - /opt/homebrew/bin/bash Binaries: Node: 20.3.1 - /opt/homebrew/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.6.7 - /opt/homebrew/bin/npm Browsers: Safari: 16.6 npmPackages: vite: ^5.0.2 => 5.0.2
The text was updated successfully, but these errors were encountered: