dioxus
dioxus copied to clipboard
Partially Fix Hotreload
- Normalizes all template names to follow
foo/bar/baz.rs - Fixes a caching issue on Web with re-sending the templates that occurred before a full reload.
This gets hot reloading working on Web for the Tailwind example. Desktop requires more work as it's affected by #1586 and #2486.
I noticed that there were two separate socket systems between Web & Desktop. I think these should be merged into the Web's socket system with the communication models being standardized between them. This would also allow hot reload to a mobile device from the host machine in the future.
Half-Fixes #2180 but should fix any tailwind/hotreload in cases where \n or \t aren't used in RSX.
Testing: To test if the template path name standardization logic works correctly between platforms.
- [x] Windows
- [x] Linux (I'll test this)
- [ ] Mac
Looks like these issues might already be fixed in #2258.
I'm not normalizing path names so that's still a useful change. If this is something we can backport then I'd still like to accept this PR so we can get it out to Dioxus 0.5 users!
Oh, I think I did #1586 in my PR. We were to_string the wrong thing and it wasn't escaping stuff correctly. Need to check,
Maybe we could backport a fix for that too?