prerender-spa-plugin
prerender-spa-plugin copied to clipboard
Not working with multpile webpack configs
Prerendering is not working if you have e.g. two webpack configs in an array like described here: https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations
The prerendering (with puppeteer) is rendering one config just fine, the second one seems to render the first config, as the html output is the same for both configs in the array.
It is working if I run the configs separately by using the --config-name
webpack parameter to target only one config at a time.
Is there a way to circumvent this issue somehow?
Could you run the two configs separately in sequence? For instance, with NPM
"scripts": {
"build:prerender": "webpack --config-name-1 && webpack --config-name-2"
}
?