const path = require('path')
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin')
const webpack = require('webpack')
module.exports = {
entry: {
main: path.join(__dirname, './src/index.js'),
handleIf: path.join(__dirname, './src/helpers/handleIf.js')
},
output: {
path: path.join(__dirname, 'dist')
},
module: {
rules: [{
test: /\.js$/,
loaders: ['babel-loader'],
include: path.join(__dirname, 'src')
}]
},
plugins: [
new LodashModuleReplacementPlugin(),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
]
}
|