Files
vue-audio-recorder/webpack.prod.js
2018-10-05 22:51:20 +03:00

37 lines
742 B
JavaScript

const path = require('path')
const webpack = require('webpack')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
entry: {
main: './src/index.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'vue-audio-recorder.min.js',
library: 'VueAudioRecorder',
libraryTarget: 'umd',
libraryExport: 'default',
umdNamedDefine: true
},
optimization: {
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true
})
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.LoaderOptionsPlugin({
minimize: false
})
]
}