after prerender-spa-plugin@3.2.1 is installed and configured, build, will appear when there are more than 12 routes to be rendered. Unable to prerender all routes, will always be in building for production.. It doesn"t stop. After studying for a long time, I can"t find a way. Now I can only pack the route in two batches. It doesn"t feel good.
webpack.prod.conf.js
const PrerenderSPAPlugin = require("prerender-spa-plugin")
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer
new PrerenderSPAPlugin({
// webpakc
//
staticDir: path.join(__dirname, "../dist"),
// index /index/param1
//
//
routes: ["/", "/activity", "/seven-star", "/order", "/special", "/admission", "/information", "/red-lines", "/wechat", "/share", "/resources", "/express", "/introduce", "/join-in", "/contact"],
//
renderer: new Renderer({
ignoreJSErrors: true,
inject: {
foo: "bar"
},
headless: false,
// main.js document.dispatchEvent(new Event("render-event"))
renderAfterDocumentEvent: "render-event",
renderAfterTime: 5000
})
})
error message:
ask for the help of all the great gods