Skip to content
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-vue regression with css-module bundling #8048

Closed
7 tasks done
Szymon-dziewonski opened this issue May 6, 2022 · 1 comment · Fixed by #8059
Closed
7 tasks done

@vite/plugin-vue regression with css-module bundling #8048

Szymon-dziewonski opened this issue May 6, 2022 · 1 comment · Fixed by #8059
Labels
pending triage regression The issue only appears after a new release

Comments

@Szymon-dziewonski
Copy link

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 using vite build and vite, meaning for development and production/

Css modules file is requested 2 times in the development mode:
image (10)

Newest @vitejs/plugin-vue v2+ - bundle output:
image (4)

We managed to create some simple plugin that mitigates current issue, bundle output:
image (5)

Possible regression since @vitejs/plugin-vue v1+ - bundle output:
image (8)

Component used for testing
image (7)

Style module used for testing
image (6)

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

MacOs 11.6.4 or 11.5.2
Browser Opera 85, Chrome 101.0.4951.54

Used Package Manager

yarn

Logs

No response

Validations

@sapphi-red sapphi-red added regression The issue only appears after a new release plugin: vue labels May 6, 2022
@sapphi-red
Copy link
Member

I confirmed #5994 is affecting this (reverting it fixed this).

@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending triage regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants