Skip to content

Commit

Permalink
REVIEW: Add strip-loader to remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Dec 28, 2016
1 parent 6aa25b8 commit 920589b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions zeppelin-web/package.json
Expand Up @@ -66,6 +66,7 @@
"npm-run-all": "^3.1.2",
"postcss-loader": "^1.2.1",
"raw-loader": "^0.5.1",
"strip-loader": "^0.1.2",
"style-loader": "^0.13.1",
"time-grunt": "^0.3.1",
"webpack": "^1.14.0",
Expand Down
7 changes: 6 additions & 1 deletion zeppelin-web/webpack.config.js
Expand Up @@ -130,6 +130,11 @@ module.exports = function makeWebpackConfig () {
* This handles most of the magic responsible for converting modules
*/

var jsLoaders = ['ng-annotate', 'babel-loader'];
if (isProd) {
jsLoaders.push('strip-loader?strip[]=console.log');
}

// Initialize module
config.module = {
preLoaders: [],
Expand All @@ -139,7 +144,7 @@ module.exports = function makeWebpackConfig () {
// Transpile .js files using babel-loader
// Compiles ES6 and ES7 into ES5 code
test: /\.js$/,
loaders: ['ng-annotate', 'babel-loader'],
loaders: jsLoaders,
exclude: /(node_modules|bower_components)/,
}, {
// CSS LOADER
Expand Down

0 comments on commit 920589b

Please sign in to comment.