Unable to prerender all routes! #196
Description
Hi, I have a trouble in using prerender-spa-plugin in my vue project with vue2.0 + vue-router.
This is my webpack.prod.conf.js:
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, '../dist'),
routes: ['/home/homePage'],
})
This is my /router/index.js:
export default new Router({
mode: 'history',
linkActiveClass: 'is-active',
routes: [
{ path: '/', redirect: '/home/layout' },
...Home
]
})
This is my router under layout:
export default {
name: 'home.layout',
path: '/home/layout',
component: r => require.ensure([], () => r(require('src/modules/home/layout/page/index.vue')), 'HomeLayout'),
redirect: '/home/homePage',
children: [
homePage
]
};
My homePage is under layout.When I build:
building for production...[prerender-spa-plugin] Unable to prerender all routes!
(node:6184) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Navigation Timeout Exceeded: 30000ms exceeded
Can you help me?Thanks
Activity
JoshTheDerf commentedon May 16, 2018
Looks like you need to configure your renderer. You haven't set any triggers for it to render on.
This one will render after five seconds.
484sha commentedon May 22, 2018
Thanks a lot.I have been resolved the problem.
katoto commentedon Jul 18, 2018
how to ?
484sha commentedon Aug 27, 2018
@katoto You can use
renderAfterTime
lzh15378738622 commentedon Oct 20, 2020
maybe my project run build it's suceess, but whatever the config routes is, the build result has only one dir in dist !
lzh15378738622 commentedon Oct 20, 2020