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

Identify CSS to reload from the href #524

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

akesson
Copy link
Contributor

@akesson akesson commented Feb 14, 2023

Identify the CSS to reload from the href, which is already sent to the browser in the WebSocket message, instead of using the CSS id.

This opens the possibility to have more than one CSS file that is hot-reloaded by cargo-leptos. I plan on using that for the Tailwind implementation.

This is backwards compatible with previous cargo-leptos versions.

@benwis Ok for you? I have to admit that I didn't test it with an Axum setup as I don't have one easily available. Would appreciate it if you could test it!

@gbj I would be really good to include this in release 0.2.0.

@benwis
Copy link
Contributor

benwis commented Feb 14, 2023

@akesson Is the actix one supposed to be matching "fail"?

@akesson
Copy link
Contributor Author

akesson commented Feb 14, 2023

🤦 Thanks @benwis for spotting that. It was for testing the error message.

@benwis
Copy link
Contributor

benwis commented Feb 14, 2023

Other than that, It looks fine to me. I see no reason Axum would work any differently than Actix here. I tried it and it seems sane

@gbj
Copy link
Collaborator

gbj commented Feb 14, 2023

Yep looks good to me. I'm doing a little refactoring into a leptos_integration_utils package as part of the in-order streaming/async stuff, by the way, so this code will live in one place in the future. Will merge right now.

@gbj gbj merged commit bde585d into leptos-rs:main Feb 14, 2023
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.

None yet

3 participants