From 9178c3c772846803231e7fd873ea4cbda97a2e2a Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Thu, 14 Mar 2019 23:57:54 -0400 Subject: [PATCH] Adopt Mix extract default SplitChunksPlugin configuration --- webpack.mix.js | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/webpack.mix.js b/webpack.mix.js index 4a5c908e4..da7e11714 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -24,28 +24,6 @@ mix.webpackConfig({ 'styles': path.resolve('frontend/scss') } }, - optimization: { - runtimeChunk: { - name: 'assets/admin/js/manifest' - }, - splitChunks: { - cacheGroups: { - vendor: { - test (module, chunks) { - // This prevents stylesheet resources with these extensions - // from being moved from their original chunk to the vendor chunk - if (module.resource && (/^.*\.(css|scss|less)$/).test(module.resource)) { - return false - } - return module.context && module.context.indexOf('node_modules') !== -1 - }, - chunks: "initial", - name: "assets/admin/js/vendor", - enforce: true - } - } - } - }, module: { rules: [ { @@ -81,6 +59,8 @@ mix.js( 'public/assets/admin/css' ) +mix.extract() + if (mix.inProduction()) { mix.version() } else {