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
With @vite/plugin-vue version above 2.0.0, there is regression connected to css modules being duplicated in output JS bundle. This exists when building the app using vite build and vite, meaning for development and production/
Css modules file is requested 2 times in the development mode:
Newest @vitejs/plugin-vue v2+ - bundle output:
We managed to create some simple plugin that mitigates current issue, bundle output:
Possible regression since @vitejs/plugin-vue v1+ - bundle output:
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.
Describe the bug
With
@vite/plugin-vue
version above 2.0.0, there is regression connected to css modules being duplicated in output JS bundle. This exists when building the app usingvite build
andvite
, meaning for development and production/Css modules file is requested 2 times in the development mode:
Newest
@vitejs/plugin-vue
v2+ - bundle output:We managed to create some simple plugin that mitigates current issue, bundle output:
Possible regression since
@vitejs/plugin-vue v1+
- bundle output:Component used for testing
Style module used for testing
Whole reproduction scenario is available https://github.com/FRSOURCE/vite-plugin-vue-dedupe-css-modules/tree/main/example/vue
Reproduction
https://github.com/FRSOURCE/vite-plugin-vue-dedupe-css-modules/tree/main/example/vue
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: