diff --git a/ace-loader/webpack.rich.config.js b/ace-loader/webpack.rich.config.js index 54c1a70..8b34c67 100644 --- a/ace-loader/webpack.rich.config.js +++ b/ace-loader/webpack.rich.config.js @@ -143,28 +143,7 @@ let config = { poll: false, ignored: /node_modules/ }, - optimization: { - splitChunks: { - chunks(chunk) { - return !/^\.\/workers\//.test(chunk.name) && !/^\.\/TestAbility/.test(chunk.name); - }, - minSize: 0, - cacheGroups: { - vendors: { - test: /[\\/]node_modules[\\/]/, - priority: -10, - name: "vendors", - }, - commons: { - test: /\.js|css|hml$/, - name: 'commons', - priority: -20, - minChunks: 2, - reuseExistingChunk: true - } - } - }, - }, + output: { filename: '[name].js', devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]', @@ -298,7 +277,32 @@ module.exports = (env) => { if (process.env.DEVICE_LEVEL === 'card') { config.module = cardModule config.plugins.push(new AfterEmitPlugin()) + if (env.isPreview !== "true") { + notPreview(env) + } } else { + config.optimization = { + splitChunks: { + chunks(chunk) { + return !/^\.\/workers\//.test(chunk.name) && !/^\.\/TestAbility/.test(chunk.name); + }, + minSize: 0, + cacheGroups: { + vendors: { + test: /[\\/]node_modules[\\/]/, + priority: -10, + name: "vendors", + }, + commons: { + test: /\.js|css|hml$/, + name: 'commons', + priority: -20, + minChunks: 2, + reuseExistingChunk: true + } + } + }, + } if (env.isPreview !== "true") { notPreview(env) }