mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-23 21:58:48 +00:00
more DRY re: config
This commit is contained in:
parent
04fcb1510a
commit
35f92f2ae8
@ -50,13 +50,12 @@ class WebpackProcess extends ProcessWrapper {
|
|||||||
let config, configPath;
|
let config, configPath;
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync(dappConfigPath)) {
|
if (fs.existsSync(dappConfigPath)) {
|
||||||
delete require.cache[dappConfigPath];
|
|
||||||
configPath = dappConfigPath;
|
configPath = dappConfigPath;
|
||||||
config = require(dappConfigPath);
|
delete require.cache[configPath];
|
||||||
} else {
|
} else {
|
||||||
configPath = defaultConfigPath;
|
configPath = defaultConfigPath;
|
||||||
config = require(defaultConfigPath);
|
|
||||||
}
|
}
|
||||||
|
config = require(configPath);
|
||||||
// valid config types: https://webpack.js.org/configuration/configuration-types/
|
// valid config types: https://webpack.js.org/configuration/configuration-types/
|
||||||
// + function that returns a config object
|
// + function that returns a config object
|
||||||
// + function that returns a promise for a config object
|
// + function that returns a promise for a config object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user