You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only place where put link element is generateBundle and it's only for index.html
other css which have no faceModuleId will be ignored instead of inject in js
One way to solve this is :
modify vite/src/plugins/css.ts line: 220 to the following to inject css in SFC-js
@yyx990803 I am happy to get your attention, but the css does not inject as well
from html chunk, other chunks all import from chunk.dynamicImports not chunk.imports
For example, PScroll.vue is import async, when build, PScroll.js and PScroll.css created, but PScroll.css does not inject in PScroll.js, so when PScroll.js imported, PScroll.css does not import.
so, what i can support is inject these css files in PScroll.js with
Describe the bug
In dev mode, it runs normally.
When build, it misses some css.
Reproduction
https://github.com/LoveofRedMoon/vite-build-css-error.git
or: https://prod.liveshare.vsengsaas.visualstudio.com/join?2E874AA8B27402C760D49A8AB6CF7B1A0A51
see localhost:3000(dev) localhost:8080(build-production)
System Info
vite
version: 2.0.0-beta.3vue
version (fromyarn.lock
orpackage-lock.json
) 3.0.5@vue/compiler-sfc
versionLogs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.Only place where put
link
element isgenerateBundle
and it's only for index.htmlother css which have no faceModuleId will be ignored instead of inject in js
One way to solve this is :
modify vite/src/plugins/css.ts line: 220 to the following to inject css in SFC-js
The following is one chunk I print in console with null faceModuleId, and this css did not inject in
assets/PScroll.729023c1.js
The text was updated successfully, but these errors were encountered: