-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite plugin: get duplicated CSS using import './<file>.css'
#8830
Comments
This is intended. @pcattori Maybe it would be a good idea to add a comment to the remix injected style explaining the reason for the duplication to avoid future issues being filed. |
From https://github.com/vitejs/vite/blob/7cfe80d0df7edfe861b8cc281303f20fc7633841/packages/vite/src/client/client.ts#L380 we can see |
Reproduction
When using vite dev server,
import './<file>.css'
will cause the css being injected twice.StackBlitz: https://stackblitz.com/edit/remix-vite-bug-css-duplicate?file=package.json&initialPath=test
System Info
Used Package Manager
pnpm
Expected Behavior
The referenced css should only be injected once.
Actual Behavior
The text was updated successfully, but these errors were encountered: