From 5581b9c1b3404b42be1eaa931613d5047676f6d9 Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Thu, 16 May 2019 11:48:19 +0800 Subject: [PATCH 1/2] repair 'call' undefine bug --- frontend/config/webpack.config.prod.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/config/webpack.config.prod.js b/frontend/config/webpack.config.prod.js index 3e53ec13d1..961ca99e79 100644 --- a/frontend/config/webpack.config.prod.js +++ b/frontend/config/webpack.config.prod.js @@ -111,6 +111,9 @@ module.exports = { .relative(paths.appSrc, info.absoluteResourcePath) .replace(/\\/g, '/'), }, + optimization: { + concatenateModules: false, + }, resolve: { // This allows you to set a fallback for where Webpack should look for modules. // We placed these paths second because we want `node_modules` to "win" @@ -325,6 +328,7 @@ module.exports = { // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. new ExtractTextPlugin({ filename: cssFilename, + allChunks: true }), // Generate a manifest file which contains a mapping of all asset filenames // to their corresponding output file so that tools can pick it up without From deea2ac7175bfa6264b2ee3d6c5fcd2bcc33b0ff Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Thu, 16 May 2019 13:49:33 +0800 Subject: [PATCH 2/2] update package script --- frontend/config/webpack.config.prod.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/config/webpack.config.prod.js b/frontend/config/webpack.config.prod.js index 961ca99e79..b2931b221c 100644 --- a/frontend/config/webpack.config.prod.js +++ b/frontend/config/webpack.config.prod.js @@ -111,9 +111,6 @@ module.exports = { .relative(paths.appSrc, info.absoluteResourcePath) .replace(/\\/g, '/'), }, - optimization: { - concatenateModules: false, - }, resolve: { // This allows you to set a fallback for where Webpack should look for modules. // We placed these paths second because we want `node_modules` to "win" @@ -276,6 +273,12 @@ module.exports = { ], }, plugins: [ + new webpack.LoaderOptionsPlugin({ + // test: /\.xxx$/, // may apply this only for some modules + options: { + concatenateModules: false + } + }), // Makes some environment variables available in index.html. // The public URL is available as %PUBLIC_URL% in index.html, e.g.: //