Fix watch command not working
This commit is contained in:
parent
3528e8179d
commit
b1c59d866a
1 changed files with 3 additions and 2 deletions
|
|
@ -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 => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue