-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Styles in built css file seem out of order #1171
Comments
The order of `chunk.module` is messed, Use `this.getModuleInfo(facadeModuleId)!.importedIds` instead of it. fix vitejs#1171
@underfin @yyx990803
One could argue that this is due to the index.css file being imported after App.vue. When moving the import of index.css to the top the order seems to be ok (for my case). The templates and even tailwind suggest above import order. Hence I would expect that when a css file is imported that all extracted SFC css is appended automatically despite the order of imports during a prodution build. Or it needs to be documented. Or am I missing something? |
@bux isn't it expected behavior for CSS to be extracted in the order they are imported? |
I agree with you. The confusion arose because of the order of the imports suggested in the templates and the tailwind documentation. Especially the latter would be kind of "bad practice" then. |
Describe the bug
I'm using vite with tailwind. Inside the index.css file I import the three tailwind base files.
The output of the
vite build
command though starts with all css from the SFCs (postcss-nested is used) then adds the imported tailwind files and finally adds media queries from tailwind.I would expect to have the SFC css after everything that's inside "index.css"
Reproduction
https://bitbucket.org/kh-JDA/crguide-vue3/src/master/
System Info
vite
version: "^1.0.0-rc.13"vue
version (fromyarn.lock
orpackage-lock.json
) 3.0.3@vue/compiler-sfc
version 3.0.3Logs (Optional if provided reproduction)
The text was updated successfully, but these errors were encountered: