From d06ffa3ded515389f6e2845f379f3f43ecdfb977 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 22 Nov 2017 18:16:56 -0700 Subject: [PATCH] Enable WebPack scope hoisting. This is only enabled for the production build, as it breaks Hot Module Reloading. --- webpack.prod.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.prod.js b/webpack.prod.js index d9b3d05a8e30..d3b9fd9fd964 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -27,6 +27,9 @@ module.exports = merge.smart(require('./webpack.base.js'), { NETLIFY_CMS_VERSION: JSON.stringify(require("./package.json").version), }), + // Combine/hoist module scopes when possibile. + new webpack.optimize.ModuleConcatenationPlugin(), + // Minify and optimize the JavaScript new UglifyJsPlugin({ sourceMap: true,