Replies: 1 comment 1 reply
-
In this case I'd usually put the static files in a non-root directory so they had URLs like The JS/WASM are served correctly in the case you describe because they are in the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While rewriting a web app in Leptos I ran into a problem with loading an external SVG file.
My goal was to use symbols in the external file for button icons, like my original app did.
The new app uses a router, which causes a problem.
When the page requests the SVG file, the router interprets the request as if "symbols.svg" were the
id
parameter, which I suppose is to be expected. I wanted instead to specify that the symbol file URL was meant to be served as is, in the way that JavaScript and style sheets are, but as far as I've been able to determine, SVG files are not passed through, and the router only handles views.After drafting this I found a way of handling icons by implementing a view that returns their SVG markup directly instead of trying to get them as symbols from a file, but I still wonder if Leptos makes any accommodation for loading a resource file like this.
Beta Was this translation helpful? Give feedback.
All reactions