Skip to content

Commit

Permalink
Do not build json3 and debug modules
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Mar 19, 2017
1 parent 52cc3ee commit fea46d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -17,7 +17,7 @@
"start-dev": "npm-run-all --parallel watch start",
"build": "npm-run-all build:*",
"build:font-awesome": "node scripts/build-fontawesome.js",
"build:webpack": "webpack",
"build:webpack": "webpack --progress",
"watch": "webpack --watch",
"test": "npm-run-all -c test:* lint",
"test:mocha": "mocha",
Expand Down Expand Up @@ -75,6 +75,7 @@
"socket.io-client": "1.7.3",
"stylelint": "7.9.0",
"urijs": "1.18.9",
"webpack": "2.2.1"
"webpack": "2.2.1",
"webpack-remove-debug": "0.1.0"
}
}
9 changes: 9 additions & 0 deletions webpack.config.js
Expand Up @@ -27,6 +27,12 @@ let config = {
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: "webpack-remove-debug"
}
},
{
test: /\.js$/,
include: [
Expand Down Expand Up @@ -60,6 +66,9 @@ let config = {
},
]
},
externals: {
json3: "JSON", // socket.io uses json3.js, but we do not target any browsers that need it
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("js/bundle.vendor.js")
]
Expand Down

0 comments on commit fea46d1

Please sign in to comment.