Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now (Zeit.co) config #52

Open
sergeyfilimonov opened this issue Oct 7, 2019 · 1 comment
Open

Now (Zeit.co) config #52

sergeyfilimonov opened this issue Oct 7, 2019 · 1 comment

Comments

@sergeyfilimonov
Copy link

sergeyfilimonov commented Oct 7, 2019

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!

@ricky11
Copy link

ricky11 commented Dec 22, 2020

Did you solve your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants