Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Remove comments from the dist bundle #66

Merged
merged 1 commit into from Dec 12, 2016
Merged
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: 1 addition & 0 deletions generators/app/conf.js
Expand Up @@ -124,6 +124,7 @@ module.exports = function webpackConf(options) {
if (options.dist === true) {
conf.plugins.push(
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down
7 changes: 7 additions & 0 deletions test/app/conf.js
Expand Up @@ -289,6 +289,7 @@ test('conf with angular1/scss/js', t => {
template: conf.path.src('index.html')
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -355,6 +356,7 @@ test('conf with angular1/scss/js', t => {
template: conf.path.src('index.html')
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -421,6 +423,7 @@ test('conf with angular1/styl/typescript', t => {
template: conf.path.src('index.html')
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -507,6 +510,7 @@ test('conf with angular2/less/typescript', t => {
'process.env.NODE_ENV': '"production"'
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -592,6 +596,7 @@ test('conf with angular2/less/typescript/todoMVC', t => {
'process.env.NODE_ENV': '"production"'
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -752,6 +757,7 @@ test('conf with angular2/css/js', t => {
'process.env.NODE_ENV': '"production"'
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down Expand Up @@ -930,6 +936,7 @@ test('conf with react/css/typescript/todoMVC', t => {
'process.env.NODE_ENV': '"production"'
})`,
lit`new webpack.optimize.UglifyJsPlugin({
output: {comments: false},
compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
})`,
lit`new ExtractTextPlugin('index-[contenthash].css')`,
Expand Down