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
Same as #1629
I am trying to @import an empty theme.css file from src/ using (see Reproduction)
The Vite docs are pretty scarce on syntax/plugins to install/write.
I initially supposed that lang="postcss" is not required ?
same for installing postcss and/or postcss-import libraries ?
same for the postcss.config.js file ?
I have tried adding all the above but still get this error (see Logs section)
Vite seems unable to resolve @import word, despite #1629 saying it is fixed/merged ?
I am honestly clueless on what is preventing Vite to recognize @import keyword, which is extremely commonly used.
Reproduction
// App.vue
<style>
@import './theme'
</style>
System Info
vite version: ^2.0.0-beta.49
Operating System: Windows10
Node version: 15.6
Package manager (yarn) and version: 1.22.10
Logs (Optional if provided reproduction)
Run vite or vite build with the --debug flag.
Provide the error log here.
The text was updated successfully, but these errors were encountered:
Just initialized a bare vite project using vue-ts template,
installed postcss-import lib
added postcss.config.js with declaring the postcss-import plugin
transfered the #app css rule from App.vue into a src/theme.css file
Used @import './theme' in App.vue
... and it works o.O
EDIT#2
I found what were the problem :
the imported theme.css were "empty" in the way i commented all lines with //
=> Unknown word error
Solution: problem solved replacing these symbols with /* */
Nonetheless, it would be nice to add in docs postcss.config.js is required for any plugin, with an example using postcss-import
Describe the bug
Same as #1629
I am trying to @import an empty
theme.css
file from src/ using (see Reproduction)The Vite docs are pretty scarce on syntax/plugins to install/write.
I initially supposed that
lang="postcss"
is not required ?same for installing
postcss
and/orpostcss-import
libraries ?same for the postcss.config.js file ?
I have tried adding all the above but still get this error (see Logs section)
Vite seems unable to resolve
@import
word, despite #1629 saying it is fixed/merged ?I am honestly clueless on what is preventing Vite to recognize @import keyword, which is extremely commonly used.
Reproduction
System Info
vite
version: ^2.0.0-beta.49Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: