Fix watch command not working

This commit is contained in:
uwap 2022-11-23 12:07:32 +01:00
parent 3528e8179d
commit b1c59d866a

View file

@ -8,10 +8,11 @@ const preBuildScripts = process.env.NO_FLOW == undefined ?
: [];
const configPath = env => {
if (env.length < 3) {
const filtered = Object.keys(env).filter((e) => !e.startsWith("WEBPACK"));
if (filtered.length < 1) {
throw "No config file was provided.";
}
return path.resolve(__dirname, `config/${Object.keys(env)[2]}`);
return path.resolve(__dirname, `config/${filtered[0]}`);
};
module.exports = env => ({