Skip to content

Conversation

@oknozor
Copy link

@oknozor oknozor commented Nov 20, 2025

This PR implements #5000.

To test the implementation:

  • clone the demo app reproducer: https://github.com/oknozor/dx-hotreload-scss
  • install the Dioxus CLI from this PR .
  • run dx serve --package web in the demo app directory.
  • modify non bundled assets/hero.scss or assets/hero-sass.sass and observe hot reloading in the app.

Please let me know if you have any feedback or if further changes are needed. This is my first PR here, so I’m happy to make any adjustments if I’ve missed something important.

@oknozor
Copy link
Author

oknozor commented Nov 23, 2025

There was an issue with the wrong file being copied to android device when hot reloading.

Before 20ca013 the changed asset was file directly pushed to device instead of the processed one.

This resulted in copying the scss source instead of the compiled output. Breaking stylesheet whenever we use @use or @import.

The debug log below demonstrates the issue:

Before

13:39:34 [dev] Hotreloading asset "/code/dx-reproducer/assets/main.scss" in target "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets"
13:39:34 [dev] Compiling scss file: /code/dx-reproducer/assets/main.scss
13:39:34 [dev] copying processed asset from "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets/partial.main-dxh61f8fed067dbb6ac.css" to "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets/main-dxh61f8fed067dbb6ac.css"
13:39:34 [dev] Pushing asset "/code/dx-reproducer/assets/main.scss" to device: "/data/local/tmp/dx/main-dxh61f8fed067dbb6ac.css"

After:

13:40:43 [dev] Hotreloading asset "/code/dx-reproducer/assets/main.scss" in target "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets"
13:40:43 [dev] Compiling scss file: /code/dx-reproducer/assets/main.scss
13:40:43 [dev] copying processed asset from "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets/partial.main-dxh61f8fed067dbb6ac.css" to "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets/main-dxh61f8fed067dbb6ac.css"
13:40:43 [dev] Pushing asset "/code/dx-reproducer/target/dx/dx-reproducer/debug/android/app/app/src/main/assets/main-dxh61f8fed067dbb6ac.css" to device: "/data/local/tmp/dx/main-dxh61f8fed067dbb6ac.css"

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

Successfully merging this pull request may close these issues.

1 participant