Skip to content

Commit

Permalink
fix: Remove strip-loader to avoid single quote error
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Dec 30, 2016
1 parent e3cc8ea commit 3d3a581
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
1 change: 0 additions & 1 deletion zeppelin-web/package.json
Expand Up @@ -66,7 +66,6 @@
"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
30 changes: 21 additions & 9 deletions zeppelin-web/webpack.config.js
Expand Up @@ -130,11 +130,6 @@ 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 @@ -144,7 +139,7 @@ module.exports = function makeWebpackConfig () {
// Transpile .js files using babel-loader
// Compiles ES6 and ES7 into ES5 code
test: /\.js$/,
loaders: jsLoaders,
loaders: ['ng-annotate', 'babel-loader'],
exclude: /(node_modules|bower_components)/,
}, {
// CSS LOADER
Expand Down Expand Up @@ -231,12 +226,29 @@ module.exports = function makeWebpackConfig () {

// Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
// Minify all javascript, switch loaders to minimizing mode
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.UglifyJsPlugin({
options: {
mangle: {
'screw_ie8': true
},
preserveComments: 'some',
compress: {
'screw_ie8': true,
sequences: true,
'dead_code': true,
conditionals: true,
booleans: true,
unused: true,
'if_return': true,
'join_vars': true,
'drop_console': true
}
}
}),

// Copy assets from the public folder
// Reference: https://github.com/kevlened/copy-webpack-plugin
new CopyWebpackPlugin([
])
new CopyWebpackPlugin([])
)
} else {
config.plugins.push(new InsertLiveReloadPlugin())
Expand Down

0 comments on commit 3d3a581

Please sign in to comment.