-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
cssCodeSplit set to false results in no CSS during build #1141
Comments
Just a quick note, I confirmed that this issue is still present in rc.13. |
This is already fixed at 2.0. Please see migration guide https://vitejs.dev/guide/migration.html. |
This is only partially in 2.0. It builds the hashed CSS file in the I confirmed this with a brand new import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [ vue(), ],
build: { cssCodeSplit: false, },
}); |
Describe the bug
Setting
cssCodeSplit:false
invite.config.js
results in no CSS being emitted in thedist
folder (as .css, or within the .js file). This happens for both JavaScript-imported CSS files as well as SFC style tags.Since
index.css
is imported inmain.js
, I would have expected the contents of the file (as well as any template style tags) to be compiled into the builtindex.js
.Somewhat-related issue: #621
Reproduction
https://github.com/richardtallent/vite-issue-csscodesplit
This is just the default vite app with the addition of the
vite.config.js
file with thecssCodeSplit: false
setting. Thedist
folder is included. None of the CSS inindex.css
makes it into theindex.6fd83376.js
file, nor are any CSS URLs loaded by that code or linked inindex.html
.System Info
vite
version: vite v1.0.0-rc.9vue
version: @vue/cli 4.5.8The text was updated successfully, but these errors were encountered: