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

Scoped CSS id's are decoupled from Vue data id's when using Vite's build --watch and styles aren't applied #8980

Closed
7 tasks done
earlAchromatic opened this issue Jul 7, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@earlAchromatic
Copy link

Describe the bug

Same issue as #6633 but includes minimal repro.

Summary of issue:

The problem is that there is decoupling between the scoped CSS id's and the data-v-xxxx ids that Vue generates when using vite's build --watch (or watch: true in the config). This is not a problem when importing the component directly instead of from the build.

Reproduction

https://github.com/earlAchromatic/Vite-Watch-Scoped-CSS

System Info

System:
    OS: macOS 12.4
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 1.09 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
Binaries:
    Node: 17.2.0 - ~/.nvm/versions/node/v17.2.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 8.1.4 - ~/.nvm/versions/node/v17.2.0/bin/npm
Browsers:
    Chrome: 103.0.5060.114
    Chrome Canary: 105.0.5165.0
    Firefox: 102.0.1
    Safari: 15.5
npmPackages:
    @vitejs/plugin-vue: ^2.3.3 => 2.3.3 
    vite: ^2.9.13 => 2.9.13

Used Package Manager

pnpm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #7980.

This is already fixed by #7989.

I confirmed it works with your reproduction too by upgrading Vite to 3.0.0 and plugin-vue to 3.0.0 and chaging this line to import * as test from 'test/vite-watch-scoped-css.mjs'.
https://github.com/earlAchromatic/Vite-Watch-Scoped-CSS/blob/5732b6d197ab0c088db4f9cd471fc099e8eded7b/playground/index.html#L17

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2022
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Jul 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants