because the pre-rendering plug-in prerender-spa-plugin, which is labor-saving and easy to configure, is selected to optimize seo,
the configuration is like this
new PrerenderSpaPlugin({
staticDir: path.resolve(__dirname, "../dist"),
routes: [ "/"],
server: {
port: 8080
},
renderer: new Renderer({
// Optional - Wait to render until the specified element is detected using `document.querySelector`
renderAfterElementExists: "-sharpgames-area",
headless: true // Display the browser window when rendering. Useful for debugging.
})
})
but the static html div-sharpapp from build contains all the static resources I want to get. Although I achieve the purpose of rendering,
, when I enter from other pages (for example, enter host/about directly in the URL column), I will flash the layout and style of the home page first
router mode is risking the use of hash (avoid trouble QQ), wants to know if there is a way to solve this problem without changing router mode
has anyone ever encountered this problem with the pre-rendering plug-in?