-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
<style> HMR require save twice when exporting a type from a component #13008
Copy link
Copy link
Closed
vitejs/vite-plugin-vue
#541Description
Vue version
3.5.13
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-fbpwhbzy?file=src%2Fcomponents%2FFoo.vue
Steps to reproduce
Setup:
- Create a
Foo.vuecomponent and export a typeFooProps. - Add a
<style>block inFoo.vue(e.g., settingbackground-color: red;). - Create a
Bar.vuecomponent and import theFooPropstype fromFoo.vue. - Use both
<Foo />and<Bar />inApp.vue.
Problem:
When running the development server with Vite, changing the background color in Foo.vue, you need to save the file twice for the styles to update in the browser.
What is expected?
After modifying the styles in Foo.vue and saving the file once, the changes should be reflected immediately.
What is actually happening?
The style updates are only applied after saving Foo.vue twice.
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
vue: ^3.5.13 => 3.5.13Any additional comments?
I’m not sure whether this issue is related to Vue or Vite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels