This repository has been archived by the owner on Apr 9, 2023. It is now read-only.
Unable to prerender all routes! #196
Comments
Looks like you need to configure your renderer. You haven't set any triggers for it to render on. new PrerenderSPAPlugin({
staticDir: path.join(__dirname, '../dist'),
routes: ['/home/homePage'],
renderer: new PrerenderSPAPlugin.PuppeteerRenderer({
renderAfterTime: 5000
})
}) |
Thanks a lot.I have been resolved the problem. |
how to ? |
@katoto You can use |
maybe my project run build it's suceess, but whatever the config routes is, the build result has only one dir in dist ! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: