eject webpack overrides

This commit is contained in:
Michael Bradley, Jr 2018-10-01 18:35:15 -05:00 committed by Pascal Precht
parent 6e238b2950
commit b2f56a9eb1
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
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) {