vite-plugin-vue
vite-plugin-vue copied to clipboard
Vue SSR playground scoped style not replaced when HRM
Related plugins
- [X] plugin-vue
- [ ] plugin-vue-jsx
Describe the bug
The <style> in App.vue is not scoped.
After making the style tag scoped. The old "unscoped" style tag is not replaced.
Reproduction
https://github.com/vitejs/vite-plugin-vue/tree/main/playground/ssr-vue
Steps to reproduce
git clone [email protected]:vitejs/vite-plugin-vue.git
cd vite-plugin-vue
pnpm install && pnpm build
cd playground/ssr-vue
pnpm dev
System Info
System:
OS: macOS 14.2
CPU: (8) arm64 Apple M1 Pro
Memory: 174.59 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
pnpm: 8.11.0 - /opt/homebrew/bin/pnpm
Browsers:
Safari: 17.2
npmPackages:
@vitejs/plugin-vue: workspace:* => 5.0.0-beta.1
@vitejs/plugin-vue-jsx: workspace:* => 3.1.0
@vitejs/test-dep-import-type: link:dep-import-type => 0.0.0
@vitejs/test-example-external-component: file:example-external-component => 0.0.0
Used Package Manager
pnpm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] 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 vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
non scoped > scoped, not removing the style by HRM.
scoped > non scoped, the scoped style tag is removed by HRM.