Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit feea7fe

Browse files
committed
fix(serve): fix cached file issue by only using the webpack module concat plugin for prod builds, make sure you update custom configs
1 parent 065912e commit feea7fe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

config/webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var ionicWebpackFactory = require(process.env.IONIC_WEBPACK_FACTORY);
44

55
var ModuleConcatPlugin = require('webpack/lib/optimize/ModuleConcatenationPlugin');
66

7+
var prodPlugins = [];
8+
if (process.env.IONIC_ENV === 'prod') {
9+
prodPlugins.push(new ModuleConcatPlugin());
10+
}
11+
712
module.exports = {
813
entry: process.env.IONIC_APP_ENTRY_POINT,
914
output: {
@@ -39,8 +44,7 @@ module.exports = {
3944
plugins: [
4045
ionicWebpackFactory.getIonicEnvironmentPlugin(),
4146
ionicWebpackFactory.getCommonChunksPlugin(),
42-
new ModuleConcatPlugin(),
43-
],
47+
].concat(prodPlugins),
4448

4549
// Some libraries import Node modules but don't use them in the browser.
4650
// Tell Webpack to provide empty mocks for them so importing them works.

0 commit comments

Comments
 (0)