Webpack with an array provided as config -
in webpack starter kit https://github.com/webpack/react-starter see webpack.production.config.js module not export config object array of config objects instead:
module.exports = [ require("./make-webpack-config")({ // commonschunk: true, longtermcaching: true, separatestylesheet: true, minimize: true // devtool: "source-map" }), require("./make-webpack-config")({ prerender: true }) ];
what happen in case, when multiple config objects provided? isn't mentioned in webpack's docs
passing array enables webpack's multi-compiler mode. it's way run webpack multiple times in 1 pass. instance, if you're making chrome & firefox extension, use multi-compiler create both @ once.
webpack multi-compiler example using mobile/desktop bundles.
Comments
Post a Comment