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

[pigment-css][vite] HMR doesn't work when removing a css property #41628

Closed
o-alexandrov opened this issue Mar 24, 2024 · 1 comment · Fixed by #41667
Closed

[pigment-css][vite] HMR doesn't work when removing a css property #41628

o-alexandrov opened this issue Mar 24, 2024 · 1 comment · Fixed by #41667
Assignees
Labels
package: pigment-css Specific to @pigment-css/*

Comments

@o-alexandrov
Copy link

o-alexandrov commented Mar 24, 2024

Steps to reproduce

Link to live example: https://github.com/o-alexandrov/pigment-css-hmr-bug

Steps:

  1. Run npm run dev
  2. Look at the styles in the browser
  3. Edit existing styles in src/css.ts (ex. background)
  4. HMR doesn't work
Screen.Recording.2024-03-24.at.1.51.02.AM.mov

Current behavior

HMR doesn't work in the described scenario

Expected behavior

HMR works

Context

No response

Your environment

npx @mui/envinfo

Used both Safari and Chrome

  System:
    OS: macOS 14.4
  Binaries:
    Node: 21.7.1 - /opt/homebrew/bin/node
    npm: 10.5.0 - /opt/homebrew/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 123.0.6312.58
    Edge: 112.0.1722.39
    Safari: 17.4
  npmPackages:
    @pigment-css/react: 0.0.3
    @pigment-css/vite-plugin: 0.0.3
    @emotion/react:  11.11.4 
    @emotion/styled:  11.11.0 
    @mui/private-theming:  5.15.14 
    @mui/styled-engine:  5.15.14 
    @mui/system:  5.15.14 
    @mui/types:  7.2.14 
    @mui/utils:  5.15.14 
    @types/react: 18.2.65 => 18.2.65 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: 5.4.2 => 5.4.2 

Search keywords: pigment hmr

@o-alexandrov o-alexandrov added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 24, 2024
@danilo-leal danilo-leal added the package: pigment-css Specific to @pigment-css/* label Mar 25, 2024
@brijeshb42 brijeshb42 removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 25, 2024
brijeshb42 added a commit to brijeshb42/material-ui that referenced this issue Mar 26, 2024
and just send the reload event to refresh the contents on client side.

Fixes mui#41628
brijeshb42 added a commit to brijeshb42/material-ui that referenced this issue Mar 27, 2024
and just send the reload event to refresh the contents on client side.

Fixes mui#41628
@o-alexandrov
Copy link
Author

Thank you, it's fixed in the unpublished changes.
I installed the packages, referencing them locally and manually confirmed HMR is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: pigment-css Specific to @pigment-css/*
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants