Webpack with an array provided as config

前端 未结 2 749
粉色の甜心
粉色の甜心 2021-02-05 02:06

In this webpack starter kit https://github.com/webpack/react-starter I see the webpack.production.config.js module does not export only a config object but an array of config ob

2条回答
  •  青春惊慌失措
    2021-02-05 02:53

    Passing an array enables Webpack's multi-compiler mode. It's just a way to run Webpack multiple times in one pass. For instance, if you're making a Chrome & Firefox extension, you could use the multi-compiler to create both at once.

    Webpack Multi-compiler example using mobile/desktop bundles.

提交回复
热议问题