Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TCourtneyOwen committed Dec 12, 2018
2 parents 4e66d1d + 6851124 commit f70e9e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
12 changes: 7 additions & 5 deletions src/app/templates/ts/react/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ const WEBPACK_PLUGINS = [
minimize: true
}
}
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: Infinity,
chunks: ['app']
})
];

Expand All @@ -101,6 +96,13 @@ module.exports = {
module: {
rules,
},
optimization: {
splitChunks: {
chunks: 'async',
minChunks: Infinity,
name: 'vendor'
}
},
plugins: [
...WEBPACK_PLUGINS,
new ExtractTextPlugin('[name].[hash].css'),
Expand Down
18 changes: 4 additions & 14 deletions src/app/templates/ts/react/config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,8 @@ module.exports = webpackMerge(commonConfig, {
hints: "warning"
},

plugins: [
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
mangle: {
screw_ie8: true,
keep_fnames: true
},
compress: {
warnings: false,
screw_ie8: true
},
comments: false
})
]
optimization: {
minimize: true
}
});

9 changes: 5 additions & 4 deletions src/app/templates/ts/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"@types/webpack": "2.2.12",
"@types/webpack-dev-server": "1.12.6",
"autoprefixer": "6.7.7",
"copy-webpack-plugin": "4.0.1",
"copy-webpack-plugin": "4.6.0",
"css-loader": "0.27.3",
"extract-text-webpack-plugin": "2.1.0",
"extract-text-webpack-plugin": "4.0.0-beta.0",
"file-loader": "0.10.1",
"html-webpack-plugin": "2.28.0",
"html-webpack-plugin": "3.2.0",
"less": "^3.0.1",
"less-loader": "^4.0.5",
"postcss-loader": "1.3.3",
Expand All @@ -41,7 +41,8 @@
"tslint": "^5.9.1",
"ts-loader": "^3.5.0",
"typescript": "^2.7.2",
"webpack": "^3.11.0",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.1",
"webpack-merge": "^4.1.1"
}
Expand Down

0 comments on commit f70e9e9

Please sign in to comment.