2020-04-26 17:49:20 +00:00
|
|
|
require('dotenv').config();
|
|
|
|
|
|
|
|
const { NODE_ENV } = process.env;
|
|
|
|
|
2022-05-11 17:40:34 +00:00
|
|
|
switch (NODE_ENV) {
|
2020-04-26 17:49:20 +00:00
|
|
|
case 'development':
|
|
|
|
case 'production':
|
|
|
|
case 'test':
|
2021-09-17 16:26:57 +00:00
|
|
|
module.exports = require(`./webpack/${NODE_ENV}`); break;
|
2020-04-26 17:49:20 +00:00
|
|
|
default:
|
|
|
|
console.error('ERROR: NODE_ENV must be set to either `development`, `test`, or `production`.');
|
|
|
|
process.exit(1);
|
|
|
|
}
|