Open antonioaltamura opened 3 years ago
Hello! Facing the same issue, my router version is 1.7.4. Up!
Assuming you're using Snowpack: you need to define SPA Fallback Paths
I too have a similar issue. I have a lit project as well and I am getting a similar issue only on child routes.
/home WORKS /customers WORKS /customers/14 NOT WORK
When I refresh the page I do not get a 404 on the page, but styles listed using relative paths in the index.html get a 404 bc the base url i believe changes on a refresh when on a child route.
Instead of using http://localhost:8000 as the base url, when refreshing the page on a child route the base url becomes http://localhost:8000/customers, If I was on the child route /customers/14 for example.
This is what the url is on refresh for one of the stylesheets...
http://localhost:8000/employees/node_modules/@rask/web/src/css/baseline.css
Hello, I'm trying to integrade vaadin router in a lit-element project. I realised if you refresh any page other than the home page, like
/users/kim
you are going to get a 404. That is obviously because the webserver (whatever it is) looks for the physical file/users/kim
. What is the preferred way to workaround this? A redirect toindex.html
by default is not optimal, because you will getindex.html
even if you try to visit a wrong url like/fake_url_that_actually_should_return_404
.