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
When css is dynamically imported (such as, for instance, when dynamically importing a .svelte file) and combined with any css with @import statements, a warning that is sprurious to the user is displayed. I think this only occurs in library mode, or perhaps when cssCodeSplit is false.
vite v2.6.7 building for production...
✓ 3 modules transformed.
rendering chunks (2)...warnings when minifying css:
> <stdin>:2:0: warning: All "@import" rules must come first
2 │ @import "https://cdn.jsdelivr.net/npm/@mdi/font@5.9.55/css/materialde...
╵ ~~~~~~~
<stdin>:1:0: note: This rule cannot come before an "@import" rule
1 │ .dyn-is-included { font-size: 42px; }
╵ ^
This is the same repro as #4625, just a much less urgent bug.
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/vue-next instead.
SohumB
changed the title
Dynamic imports that result in css being added result in spurious warnings
Dynamic css imports + css @import statements result in spurious warnings
Oct 17, 2021
Describe the bug
When css is dynamically imported (such as, for instance, when dynamically importing a
.svelte
file) and combined with any css with@import
statements, a warning that is sprurious to the user is displayed. I think this only occurs in library mode, or perhaps whencssCodeSplit
is false.vite.config.js
:index.js
:index.css
:dyn.css
:Building this results in the following warning:
This is the same repro as #4625, just a much less urgent bug.
Reproduction
https://github.com/SohumB/vite-dynamic-import-css-bug
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: