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

If style block has global attribute, reverted styles don't update until page refresh #573

Open
JohnnyFun opened this issue Feb 7, 2023 · 1 comment

Comments

@JohnnyFun
Copy link

Describe the bug

In my svelte.config.js, I'm using globalStyle. If I make a css change to a style tag with a global attribute, the app updates via HMR as expected, but if I revert the change, the app doesn't re-update to show the initial styling.

To Reproduce
Repro: https://github.com/JohnnyFun/svelte-preprocess-issue-global

Information about your project: (output of npx webpack-cli info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Memory: 11.61 GB / 31.95 GB
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.8.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 109.0.5414.120
  Packages:
    css-loader: ^6.7.3 => 6.7.3 
    svelte-loader: ^3.0.0 => 3.1.5 
    webpack: ^5.16.0 => 5.75.0 
    webpack-cli: ^5.0.1 => 5.0.1 
    webpack-dev-server: ^4.11.1 => 4.11.1 
  • svelte-preprocess version 5.0.1 (latest)

  • Whether your project uses Webpack or Rollup: webpack

@JohnnyFun
Copy link
Author

This might actually be an issue at the svelte-loader level. Looks like it happens if I explicitly use :global too and get rid of the global style attribute.

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

1 participant