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

Commit

Permalink
fix(serve): fix cached file issue by only using the webpack module co…
Browse files Browse the repository at this point in the history
…ncat plugin for prod builds, make sure you update custom configs
  • Loading branch information
danbucholtz committed Jul 10, 2017
1 parent 065912e commit feea7fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ var ionicWebpackFactory = require(process.env.IONIC_WEBPACK_FACTORY);

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

var prodPlugins = [];
if (process.env.IONIC_ENV === 'prod') {
prodPlugins.push(new ModuleConcatPlugin());
}

module.exports = {
entry: process.env.IONIC_APP_ENTRY_POINT,
output: {
Expand Down Expand Up @@ -39,8 +44,7 @@ module.exports = {
plugins: [
ionicWebpackFactory.getIonicEnvironmentPlugin(),
ionicWebpackFactory.getCommonChunksPlugin(),
new ModuleConcatPlugin(),
],
].concat(prodPlugins),

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

0 comments on commit feea7fe

Please sign in to comment.