From 1162cf5656c7836103657739ef74298f136833cd Mon Sep 17 00:00:00 2001 From: rishabh3112 Date: Mon, 18 Mar 2019 20:25:49 +0530 Subject: [PATCH] fix(add): add handling for topScope --- packages/generators/add-generator.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/generators/add-generator.ts b/packages/generators/add-generator.ts index 977850f2167..aaf8368015b 100644 --- a/packages/generators/add-generator.ts +++ b/packages/generators/add-generator.ts @@ -161,7 +161,17 @@ export default class AddGenerator extends Generator { this.configuration.config.webpackOptions.entry = entryOptions; this.configuration.config.item = action; }); - } + } else { + if(action === 'topScope'){ + return this.prompt([ + Input("topScope", "Enter line youwant to add to topScope"), + ]) + .then((topScopeAnswer) => { + this.configuration.config.topScope.push(topScopeAnswer.topScope); + done(); + }) + } + } const temp: string = action; if (action === "resolveLoader") { action = "resolve";