dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

`dx serve` hot-reloading ignores SASS @imports

Open doup opened this issue 8 months ago • 1 comments

Problem

When a SASS asset uses @imports the hot-reloading doesn't work when the imported files change.

Steps To Reproduce

  • Create a couple of SCSS files:
    • /assets/main.scss
    • /assets/card.scss
      .card {
        background-color: yellow;
      }
      
  • Import card.scss in main.scss:
    @import "card";
    // @import "./card.scss"; // This also won't work
    
  • dx serve
  • Change the contents of card.scss, the UI won't reload.

Expected behavior

dx serve should detect that the referenced card.scss changed and should reload the CSS accordingly.

Environment:

  • Dioxus version: 0.6.3 (fc1f1c2)
  • Rust version: 1.86.0 (05f9846f8 2025-03-31)
  • OS info: macOS Sequoia 15.3.1
  • App platform: desktop

Questionnaire

I'm interested in fixing this myself if it's doable for someone with little Rust experience. I suppose that this could be more manageable if it's only supported when relative paths are used, e.g. ./card or ./card.scss.

doup avatar Apr 18 '25 10:04 doup

#5000

oknozor avatar Nov 26 '25 14:11 oknozor