Skip to content

Commit 1162cf5

Browse files
committed
fix(add): add handling for topScope
1 parent 62ab32d commit 1162cf5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/generators/add-generator.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,17 @@ export default class AddGenerator extends Generator {
161161
this.configuration.config.webpackOptions.entry = entryOptions;
162162
this.configuration.config.item = action;
163163
});
164-
}
164+
} else {
165+
if(action === 'topScope'){
166+
return this.prompt([
167+
Input("topScope", "Enter line youwant to add to topScope"),
168+
])
169+
.then((topScopeAnswer) => {
170+
this.configuration.config.topScope.push(topScopeAnswer.topScope);
171+
done();
172+
})
173+
}
174+
}
165175
const temp: string = action;
166176
if (action === "resolveLoader") {
167177
action = "resolve";

0 commit comments

Comments
 (0)