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

vue-style-loader does not update styles with shadowMode + HMR #1581

Open
alancnet opened this issue Aug 20, 2019 · 2 comments
Open

vue-style-loader does not update styles with shadowMode + HMR #1581

alancnet opened this issue Aug 20, 2019 · 2 comments

Comments

@alancnet
Copy link

Version

15.7.1

Reproduction link

https://github.com/alancnet/vue-style-loader-bug

Steps to reproduce

Steps to reproduce

  1. npm install
  2. npm start
  3. Visit http://localhost:8081 in your browser.
  4. You should see "Hello World" in red.
  5. Open src/app.vue
  6. Replace color: red; with color: blue; and save.
  7. Notice the color in the browser does not change.

How to fix

  1. Open webpack.config.js
  2. Replace loader: 'vue-style-loader', with loader: '@alancnet/vue-style-loader',
  3. Repeat steps 1-6 above.
  4. Notice the color changes.

or

  1. Open webpack.config.js
  2. Replace const shadowMode = true with const shadowMode = false
  3. Repeat steps 1-6 above.
  4. Notice the color changes.

What is expected?

The styles should update with hot module replacement

What is actually happening?

The styles do not update


I have a pull request that fixes this: vuejs/vue-style-loader#41

@alancnet alancnet changed the title vue-style-loader does not update styles with shadowMode HMR vue-style-loader does not update styles with shadowMode + HMR Aug 20, 2019
@alancnet
Copy link
Author

I posted this issue here because https://new-issue.vuejs.org does not have an option for vue-style-loader.

@Hulkmaster
Copy link

It seems like you can open issue there directly via github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants