eject webpack overrides

This commit is contained in:
Michael Bradley, Jr 2018-10-01 18:35:15 -05:00
parent eeb7dd9814
commit c8f1add82c
1 changed files with 14 additions and 0 deletions

View File

@ -433,6 +433,20 @@ class EmbarkController {
fs.copySync(embarkConfig, dappConfig);
console.log(__('webpack config ejected to: ').dim.yellow);
console.log(`${dappConfig}`.green);
var dappOverrides = fs.dappPath('webpack-overrides.js');
var embarkOverrides = fs.embarkPath('lib/pipeline', 'webpack-overrides.js');
ext = 1;
let dappOverridesOld = dappOverrides;
while (fs.existsSync(dappOverridesOld)) {
dappOverridesOld = dappOverrides + `.${ext}`;
ext++;
}
if (dappOverridesOld !== dappOverrides) {
fs.copySync(dappOverrides, dappOverridesOld);
}
fs.copySync(embarkOverrides, dappOverrides);
console.log(__('webpack overrides ejected to: ').dim.yellow);
console.log(`${dappOverrides}`.green);
}
upload(options) {