Skip to content

Commit 8690416

Browse files
committed
chore(package): update to webpack 4
1 parent 515b6bc commit 8690416

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

Diff for: templates/app/_package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,12 @@
147147
"run-sequence": "^2.1.0",
148148
"lazypipe": "^1.0.1",
149149
<%# WEBPACK %>
150-
"webpack": "^3.5.5",
151-
"webpack-dev-server": "^2.4.2",
152-
"extract-text-webpack-plugin": "3.0.0",
153-
"html-webpack-plugin": "^2.24.1",
154-
"html-webpack-harddisk-plugin": "~0.1.0",
150+
"webpack": "^4.12.0",
151+
"webpack-cli": "^3.0.6",
152+
"webpack-dev-server": "^3.1.4",
153+
"extract-text-webpack-plugin": "4.0.0-beta.0",
154+
"html-webpack-plugin": "^3.2.0",
155+
"html-webpack-harddisk-plugin": "~0.2.0",
155156
<%_ if(filters.pug) { _%>
156157
"pug-html-loader": "^1.1.5",<% } %>
157158
"typescript": "~2.6.1",
@@ -174,7 +175,7 @@
174175
<%_ if(filters.stylus) { _%>
175176
"stylus": "^0.54.5",
176177
"stylus-loader": "^3.0.1",<% } %>
177-
"karma-webpack": "^2.0.3",
178+
"karma-webpack": "4.0.0-beta.0",
178179
"to-string-loader": "^1.1.5",
179180
<%# END WEBPACK %>
180181
"through2": "^2.0.1",

Diff for: templates/app/webpack.make.js

+15-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var webpack = require('webpack');
55
var HtmlWebpackPlugin = require('html-webpack-plugin');
66
var HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
77
var ExtractTextPlugin = require('extract-text-webpack-plugin');
8-
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
98
var fs = require('fs');
109
var path = require('path');
1110

@@ -26,6 +25,10 @@ module.exports = function makeWebpackConfig(options) {
2625
*/
2726
var config = {};
2827

28+
config.mode = BUILD
29+
? 'production'
30+
: 'development';
31+
2932
/**
3033
* Entry
3134
* Reference: http://webpack.github.io/docs/configuration.html#entry
@@ -310,16 +313,17 @@ module.exports = function makeWebpackConfig(options) {
310313
];
311314

312315
if(!TEST) {
313-
config.plugins.push(new CommonsChunkPlugin({
314-
name: 'vendor',
315-
316-
// filename: "vendor.js"
317-
// (Give the chunk a different name)
318-
319-
minChunks: Infinity
320-
// (with more entries, this ensures that no other module
321-
// goes into the vendor chunk)
322-
}));
316+
// TODO(webpack4)
317+
// config.plugins.push(new CommonsChunkPlugin({
318+
// name: 'vendor',
319+
//
320+
// // filename: "vendor.js"
321+
// // (Give the chunk a different name)
322+
//
323+
// minChunks: Infinity
324+
// // (with more entries, this ensures that no other module
325+
// // goes into the vendor chunk)
326+
// }));
323327
}
324328

325329
// Skip rendering app.html in test mode

0 commit comments

Comments
 (0)