Replies: 2 comments 1 reply
-
|
hi, did you find any reason? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a file (ValidationWrapper.tsx) that imports a .scss file from the same directory: import
'./ValidationWrapper.scss'. Normally, this scss file compiles into a css file that gets placed in the assets directory, and the tsx file gets compiled into a js file withimport "../../../../assets/ValidationWrapper.css";at the top.However, after making several code changes to completely unrelated files in my repository, this import statement in the JS file is now being replaced with
/* empty css */. Note that I did not change our vite config file, nor ValidationWrapper.tsx or .scss. ValidationWrapper.tsx is still being used, and because of this, it is no longer styled.I looked in the code for vite-plugin-lib-inject-css, the plugin we use to generate the individual css files and import statements, and it does not seem to be responsible for producing this /* empty css */ comment. So why is vite doing so, and how can I prevent it?
I cannot supply the repository where I'm getting the error because it is proprietary and large, and I cannot narrow down exactly what code change caused the problem, so I will not be able to provide a small reproducible example. However, I can provide my vite.config.js file to see if anyone has an idea what might be going wrong:
Beta Was this translation helpful? Give feedback.
All reactions