Skip to content

Commit cdc7288

Browse files
committed
Simplify build webpack configs thanks to webpack 4
1 parent e603e0d commit cdc7288

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use strict';
22

3-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
4-
53
module.exports = {
6-
mode: 'development',
4+
mode: 'production',
75
module: {
86
rules: [
97
{
@@ -16,6 +14,5 @@ module.exports = {
1614
]
1715
}
1816
]
19-
},
20-
plugins: [new UglifyJSPlugin()]
17+
}
2118
};

client-src/live/webpack.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
'use strict';
22

33
const path = require('path');
4-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
54
const CopyPlugin = require('copy-webpack-plugin');
65

76
module.exports = {
8-
mode: 'development',
7+
mode: 'production',
98
module: {
109
rules: [
1110
{
@@ -31,7 +30,6 @@ module.exports = {
3130
]
3231
},
3332
plugins: [
34-
new UglifyJSPlugin(),
3533
new CopyPlugin([{
3634
from: path.resolve(__dirname, 'live.html'),
3735
to: path.resolve(__dirname, '../../client/live.html')
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
'use strict';
22

3-
// eslint-disable-next-line
4-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
5-
63
module.exports = {
7-
mode: 'development',
4+
mode: 'production',
85
output: {
96
library: 'SockJS',
107
libraryTarget: 'umd'
11-
},
12-
plugins: [
13-
new UglifyJSPlugin()
14-
]
8+
}
159
};

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"eslint-plugin-import": "^2.7.0",
8484
"execa": "^0.9.0",
8585
"file-loader": "^1.1.6",
86+
"html-loader": "^0.5.5",
8687
"html-webpack-plugin": "Graham42/html-webpack-plugin#4df601b7fa89e0e30535f759b469bcfe7073a018",
8788
"istanbul": "^0.4.5",
8889
"jquery": "^3.2.1",
@@ -91,13 +92,11 @@
9192
"marked": "^0.3.9",
9293
"mocha": "^3.5.3",
9394
"mocha-sinon": "^2.0.0",
94-
"html-loader": "^0.5.5",
9595
"semver": "^5.4.1",
9696
"should": "^13.2.0",
9797
"sinon": "^4.1.3",
9898
"style-loader": "^0.20.1",
9999
"supertest": "^3.0.0",
100-
"uglifyjs-webpack-plugin": "^1.1.8",
101100
"url-loader": "^0.6.2",
102101
"webpack": "^4.0.0-beta.1",
103102
"webpack-cli": "^2.0.6",

0 commit comments

Comments
 (0)