0

I have two Webpack bundles integrated into site. I added chunks: ‘initial’ to optimization in both projects and each bundle works isolated. However, chunks from both projects seem to overwrite global functions, which leads to errors like: “n is not a function” if I load both bundles. Errors may change if I switch the order.

Is there a possibility to namespace functions and variables in the common chunks?

Thanks

Flo
  • 187
  • 2
  • 12

1 Answers1

1

The answer is to make output.jsonpFunction unique for each Webpack project.

https://github.com/webpack/webpack/issues/3791

Flo
  • 187
  • 2
  • 12