I removed the hashbang in the link with history mode in my router file. Now when I refresh a page I got the 404 error.
I tried to follow this link
then, I added the part in firebase.json :
{
"hosting": {
"public": "dist",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
however nothing has changed.
I don't understand why I've still this error. I tried many things but I can't find something to fix it.
This is my router file :
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
redirect: '/catalog'
},
{
path: '/catalog',
name: 'Catalog',
component: Catalog
},
{
path: '/catalog/category/:category',
name: 'ProductsList',
component: ProductsList
},
{
path: '/catalog/category/:category/product/:id',
name: 'ProductDetail',
component: ProductDetail,
},
{
path: '/catalog/category/:category/product/create',
name: 'CreateProduct',
component: CreateProduct
}
]
});