Add -npm option for HTML5

This commit is contained in:
Joshua Granick
2019-04-15 13:59:18 -07:00
parent 668080ac64
commit 44133fe2d4
6 changed files with 126 additions and 14 deletions

View File

@@ -0,0 +1,17 @@
const webpack = require ('webpack');
const merge = require ('webpack-merge');
const UglifyJSPlugin = require ('uglifyjs-webpack-plugin');
const common = require ('./webpack.common.js');
module.exports = merge (common, {
mode: 'production',
devtool: "source-map",
plugins: [
new UglifyJSPlugin ({
sourceMap: true
}),
new webpack.DefinePlugin ({
'process.env.NODE_ENV': JSON.stringify ('production')
})
]
});