-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
build.cssCodeSplit: false
=> CSS missing in dist/manifest.json
#6477
Comments
Same issue with the following vite configuration https://stackblitz.com/edit/vite-dkc1an?file=vite.config.js // vite.config.js
import { defineConfig } from 'vite'
import path from 'path'
export default defineConfig(() => {
return {
root: '.',
build: {
outDir: './dist',
manifest: true,
cssCodeSplit: false,
rollupOptions: {
input: {
'css/style.css': path.resolve('./style.css'),
},
},
},
}
}) npm run build
> vite-project@0.0.0 build
> vite build
vite v2.7.10 building for production...
✓ 1 modules transformed.
dist/manifest.json 0.11 KiB
dist/assets/css/style.css.1b65f072.js 0.00 KiB / gzip: 0.02 KiB # does it make any sense?
dist/assets/style.0cc4c6eb.css 0.17 KiB / gzip: 0.14 KiB # output path is wrong, I would expect dist/assets/css/style.0cc4c6eb.css {
"style.css": {
"file": "assets/css/style.css.1b65f072.js", // I would expect a CSS file, not JS
"src": "style.css",
"isEntry": true
}
} |
Was this ever solved? I'm currently facing the same issue, I'm unable to get my CSS file to bundle into one file instead of multiple... 🤔 |
No, but I made a workaround. I'm building my frontend using
Basically, it replaces the last line of my manifest file with the path to the only css file in |
Fixed in #6649 |
Describe the bug
When setting
build.cssCodeSplit: false
then the CSS is missing in thedist/manifest.json
(dist/client/manifest.json
if using vite-plugin-ssr).Reproduction
https://github.com/brillout/vite-plugin-ssr-disabled-css-codesplit/tree/main
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: