vue-cli-plugin-prerender-spa
vue-cli-plugin-prerender-spa copied to clipboard
Now (Zeit.co) config
I am using vue-cli and deploy my app on Now and experiencing the known problem when all regular SPA routes stop working as index.html
is changed. But I don't know how to configure routing all regular routes to app.html
on Now.
To see what I am talking about go to https://clubedmarketru-sfilimonov.netology-group.now.sh and click "Войти" at the top right corner.
My vue.config.js
file
module.exports = {
pluginOptions: {
prerenderSpa: {
registry: undefined,
renderRoutes: [
'/'
],
useRenderEvent: true,
headless: true,
onlyProduction: true
}
}
}
now.json
:
{
"name": "project",
"version": 2,
"github": {
"enabled": false
},
"builds": [
{
"src": "dist/**",
"use": "@now/static"
}
],
"routes": [
{
"src": "/(js|css|img|fonts|images|docs)/(.*)",
"dest": "/dist/$1/$2"
},
{
"src": "/favicon.ico",
"dest": "/dist/favicon.ico"
},
{
"src": "/robots.txt",
"dest": "/dist/robots.txt"
},
{
"src": "/(.*)",
"dest": "/dist"
}
]
}
Can anybody help me with this? Thanks!
Did you solve your issue?