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 }) ] }