webpack upgrade

This commit is contained in:
Alexey Kasyanchuk
2021-01-05 23:51:54 +03:00
parent 4b763c9377
commit 894391542a
5 changed files with 521 additions and 1616 deletions

View File

@ -3,6 +3,10 @@ const nodeExternals = require("webpack-node-externals");
const FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");
module.exports = env => {
if(env && env.test)
env = 'test'
else if(env && env.production)
env = 'production'
return {
mode: env == 'test' ? 'production' : (env || 'development'),
target: "node",