mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
webpack: discard comments
This commit is contained in:
parent
6014a5f5b0
commit
57535d9f19
1 changed files with 15 additions and 2 deletions
|
|
@ -23,7 +23,16 @@ module.exports = (env) => {
|
|||
test: /\.css$/,
|
||||
use: isDevBuild
|
||||
? ["style-loader", "css-loader"]
|
||||
: ExtractTextPlugin.extract({ use: "css-loader?minimize" })
|
||||
: ExtractTextPlugin.extract({
|
||||
use: [
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
minimize: { discardComments: { removeAll: true } }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: "url-loader?limit=25000" }
|
||||
]
|
||||
|
|
@ -44,7 +53,11 @@ module.exports = (env) => {
|
|||
})
|
||||
]
|
||||
: [
|
||||
new webpack.optimize.UglifyJsPlugin(),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
}),
|
||||
new ExtractTextPlugin("site.css")
|
||||
])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue