prerender-spa-plugin icon indicating copy to clipboard operation
prerender-spa-plugin copied to clipboard

Not working with multpile webpack configs

Open squareloop1 opened this issue 4 years ago • 1 comments

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?

squareloop1 avatar Mar 16 '20 14:03 squareloop1

Could you run the two configs separately in sequence? For instance, with NPM

"scripts": {
  "build:prerender": "webpack --config-name-1 && webpack --config-name-2"
}

?

valentinoli avatar Nov 06 '20 11:11 valentinoli