Created
September 28, 2020 14:06
-
-
Save juanbrujo/ed8f6c19c5f16c94ce5440535730ee62 to your computer and use it in GitHub Desktop.
Netlify configuration for routes in a SPA
This file contains 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
[[redirects]] | |
from = "/*" | |
to = "/index.html" | |
status = 200 |
@frederikheld super late reply and not sure if this'll help... I got it to work by writing
# Redirects from what the browser requests to what we serve
/* /index.html
into _redirect
in the published directory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is posted as the simple solution for SPA routing on Netlify all over the place but it doesn't work at all for me.
My static assets are located in
/assets/some-asset.css
. If I enter the SPA from root, it loads the assets correctly. But if I enter the SPA from /some/path, it tries to load the assets from
/some/path/assets/some-asset.css` which - obviously - fails.I'm on Vue3 with vue router. Do you have any Idea what is going wrong?