I'm developing a Single Page App using Vue CLI and want history pushstate to work so I get clean URLs.
I have to follow this: https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps and add a _redirects
file to the root of my site folder with the following:
/* /index.html 200
The problem is I don't know how to add this _redirects
file to the root of my dist folder. I tried adding it to the static folder but it ends up in a subfolder and not in root. How can I include this file so that history mode works after deploying on Netlify ?
// config/index.js
build: {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
_redirects
file in the static folder but it is then placed in the static folder in dist folder whereas I need to have_redirects
at root after build so that Netlify picks it up – Grindle