feat: webpack refactor

This commit is contained in:
NGPixel
2018-01-26 00:32:53 -05:00
parent d3720ca008
commit 6227690c94
9 changed files with 489 additions and 1600 deletions

View File

@@ -0,0 +1,22 @@
const webpack = require('webpack')
const merge = require('webpack-merge')
const CleanWebpackPlugin = require('clean-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const common = require('./webpack.common.js')
console.info(process.cwd())
module.exports = merge(common, {
module: {
rules: []
},
plugins: [
new CleanWebpackPlugin(['assets'], { root: process.cwd() }),
new UglifyJSPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
]
})