Repository navigation
fix: tailwind load problem on non root routes - #35
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I just started a web project with Dioxus. I ran
dx newand started with the template. However, I encountered an issue when trying to use my CSS files in other routes than root.Problem
The CSS worked on root http://localhost:8080/ and found the Tailwind CSS on http://localhost:8080/tailwind.css.
However, the CSS didn't work on http://localhost:8080/tool/add_commas because it was trying to locate the Tailwind file at http://localhost:8080/tools/tailwind.css, and there was no
tailwind.cssin./assets/tool/tailwind.css, which caused it to break.Solution
I managed to fix the problem by adding a
/in Dioxus.toml before tailwind.css (and my own css file). So, I decided to create a pull request for this fix.More
I'm excited about contributing to Dioxus, my favorite web framework.
If there are any issues with my PR, please let me know.
Lastly, should I apply the same change to the Desktop and FullStack templates?
Thanks for your attention and feedback!