mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-25 21:18:51 +00:00
Clean up
This commit is contained in:
parent
91e5e9c990
commit
64fdc691c4
@ -26,14 +26,7 @@ class WebpackConfigReader {
|
|||||||
// + array of named config objects
|
// + array of named config objects
|
||||||
// + config object
|
// + config object
|
||||||
if (typeof config === 'function') {
|
if (typeof config === 'function') {
|
||||||
// if(Promise.resolve(config)){
|
|
||||||
// return config(this.webpackConfigName).then(config => {
|
|
||||||
// callback(null, config);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
config = await config(this.webpackConfigName);
|
config = await config(this.webpackConfigName);
|
||||||
//return callback(null, config);
|
|
||||||
} else if (Array.isArray(config)) {
|
} else if (Array.isArray(config)) {
|
||||||
config = config.filter(cfg => cfg.name === this.webpackConfigName);
|
config = config.filter(cfg => cfg.name === this.webpackConfigName);
|
||||||
if (!config.length) {
|
if (!config.length) {
|
||||||
@ -43,7 +36,6 @@ class WebpackConfigReader {
|
|||||||
console.warn(`detected ${config.length} webpack configs having the name '${this.webpackConfigName}', using the first one`);
|
console.warn(`detected ${config.length} webpack configs having the name '${this.webpackConfigName}', using the first one`);
|
||||||
}
|
}
|
||||||
config = config[0];
|
config = config[0];
|
||||||
//return callback(null, config);
|
|
||||||
}
|
}
|
||||||
callback(null, config);
|
callback(null, config);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user