Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-1850] Remove strip-loader (webpack) #1823

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
27 changes: 18 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,26 @@ 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({
mangle: { screw_ie8: true },
preserveComments: 'some',
compress: {
screw_ie8: true,
warnings: false,
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