Preserve copyright headers, include GitHub link and version in output (#15)
This commit is contained in:
Родитель
241dd9893e
Коммит
fca3d61c5f
|
@ -1,9 +1,18 @@
|
|||
const merge = require('webpack-merge');
|
||||
const UglifyJsWebpackPlugin = require('uglifyjs-webpack-plugin');
|
||||
const common = require('./webpack.common');
|
||||
const package = require('./package.json');
|
||||
|
||||
module.exports = merge(common, {
|
||||
plugins: [
|
||||
new UglifyJsWebpackPlugin()
|
||||
new UglifyJsWebpackPlugin({
|
||||
uglifyOptions: {
|
||||
output: {
|
||||
preamble: "/* https://github.com/Microsoft/WebPerfToolbar v" + package.version + " */",
|
||||
// Don't let uglify remove important comments
|
||||
comments: /copyright|license|preserve|\/\*\!/gi,
|
||||
},
|
||||
},
|
||||
})
|
||||
]
|
||||
});
|
Загрузка…
Ссылка в новой задаче