Webpack upgraded from 4 to 5 + dependancies updated

This commit is contained in:
Simounet
2020-11-11 09:48:04 +01:00
parent c8e7722fd1
commit 9937d3a060
7 changed files with 1634 additions and 2204 deletions

View File

@ -1,8 +1,8 @@
const path = require('path');
function buildConfig(env) {
env = env || 'prod';
return require(path.resolve(__dirname, 'app/config/webpack/' + env + '.js'))({ env: env })
function buildConfig(options) {
const env = options.prod ? 'prod' : 'dev';
return require(path.resolve(__dirname, `app/config/webpack/${env}.js`));
}
module.exports = buildConfig;