Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Simplify build webpack configs thanks to webpack 4
  • Loading branch information
SpaceK33z committed Feb 17, 2018
1 parent e603e0d commit cdc7288
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
7 changes: 2 additions & 5 deletions client-src/default/webpack.config.js
@@ -1,9 +1,7 @@
'use strict';

const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
mode: 'development',
mode: 'production',
module: {
rules: [
{
Expand All @@ -16,6 +14,5 @@ module.exports = {
]
}
]
},
plugins: [new UglifyJSPlugin()]
}
};
4 changes: 1 addition & 3 deletions client-src/live/webpack.config.js
@@ -1,11 +1,10 @@
'use strict';

const path = require('path');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
mode: 'development',
mode: 'production',
module: {
rules: [
{
Expand All @@ -31,7 +30,6 @@ module.exports = {
]
},
plugins: [
new UglifyJSPlugin(),
new CopyPlugin([{
from: path.resolve(__dirname, 'live.html'),
to: path.resolve(__dirname, '../../client/live.html')
Expand Down
10 changes: 2 additions & 8 deletions client-src/sockjs/webpack.config.js
@@ -1,15 +1,9 @@
'use strict';

// eslint-disable-next-line
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
mode: 'development',
mode: 'production',
output: {
library: 'SockJS',
libraryTarget: 'umd'
},
plugins: [
new UglifyJSPlugin()
]
}
};
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -83,6 +83,7 @@
"eslint-plugin-import": "^2.7.0",
"execa": "^0.9.0",
"file-loader": "^1.1.6",
"html-loader": "^0.5.5",
"html-webpack-plugin": "Graham42/html-webpack-plugin#4df601b7fa89e0e30535f759b469bcfe7073a018",
"istanbul": "^0.4.5",
"jquery": "^3.2.1",
Expand All @@ -91,13 +92,11 @@
"marked": "^0.3.9",
"mocha": "^3.5.3",
"mocha-sinon": "^2.0.0",
"html-loader": "^0.5.5",
"semver": "^5.4.1",
"should": "^13.2.0",
"sinon": "^4.1.3",
"style-loader": "^0.20.1",
"supertest": "^3.0.0",
"uglifyjs-webpack-plugin": "^1.1.8",
"url-loader": "^0.6.2",
"webpack": "^4.0.0-beta.1",
"webpack-cli": "^2.0.6",
Expand Down

0 comments on commit cdc7288

Please sign in to comment.