mirror of
https://github.com/kevin-DL/vue-audio-recorder.git
synced 2026-01-11 10:54:26 +00:00
38 lines
768 B
JavaScript
38 lines
768 B
JavaScript
const path = require('path')
|
|
const webpack = require('webpack')
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|
|
|
module.exports = {
|
|
devtool: '#source-map',
|
|
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
|
|
})
|
|
]
|
|
}
|