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.
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/core instead.
FL3NKEY
changed the title
CSS dynamic import in node_modules package not applied with build
Missing CSS via dynamic import in node_modules package after build
Feb 9, 2022
FL3NKEY
added a commit
to FL3NKEY/vite
that referenced
this issue
Feb 9, 2022
Describe the bug
For example we have node package with some Vue components that have CSS.
Root.vue imports AsyncA.vue and AsyncB.vue components via dynamic import like this:
We have project with installed package via
npm
and importnode-package/components/Root.vue
in ourApp.vue
.If we run vite in development mode (
vite dev
), we'll see css of all components (AsyncA.vue, AsyncB.vue and Root.vue).Ok, but if we run
vite build
andvite preview
, we don't see css ofAsyncA.vue
andAsyncB.vue
components.But in console we have all css chunks.
(!!!) If we consider this case without participation node_modules (move node package directory in project root), then it will works as it should.
Thanks!
Reproduction
https://github.com/FL3NKEY/reproduce-vite-async-css-bug
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: