joeldenning / simple-single-spa-webpack-example

A simple example of how to use webpack with single-spa
MIT License
293 stars 94 forks source link

webpack.prod.js #14

Closed ArtixZ closed 5 years ago

ArtixZ commented 5 years ago

Thanks for creating this awesome example. Just wondering. Do you also have a webpack configuration for production? Are you able to extract common node modules among these sub-apps?

joeldenning commented 5 years ago

Hey ArtixZ, sorry for the very slow response. The production webpack config is the same as the development one. The webpack -p command in the build script is what tells webpack to do minification and other production optimizations.

About extracting common node_modules among the sub-apps: since this example is all being done with one webpack config, webpack already only includes one version of shared node_modules. For more information about different build setups, check out https://single-spa.js.org/docs/separating-applications.html