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
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Provide a description in this issue that describes the bug.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
When dynamically import css files, it failed to fetch with built files being served.
It works in dev mode tho.
Reproduction
https://github.com/zoubingwu/vite-dynamic-import-css-bug
this repo was created thru
yarn create @vitejs/app vite-dynamic-import-bug --template react-ts
;then simply run
yarn add prismjs
,add few lines of code in
App.tsx
:then run
yarn build
andyarn serve
, you can find errors in console:The css files were bundled,
But it requires js in the tranpiled code, and they are missing in the output:
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager:
yarn
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: