Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Jun 4, 2019
1 parent 123a150 commit 20ff530
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/generators/add-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,13 @@ export default class AddGenerator extends Generator {
* find the names of each natively plugin and check if it matches
*/
if (action === "plugins") {
let answeredPluginName = answerToAction.actionAnswer
let answeredPluginName = answerToAction.actionAnswer;
let isPrefixPresent = /webpack./.test(answeredPluginName);
if( isPrefixPresent ){
answeredPluginName = answeredPluginName.replace("webpack.","").trim()
}else{
answeredPluginName = answeredPluginName.trim()

if (isPrefixPresent) {
answeredPluginName = answeredPluginName.replace("webpack.", "").trim();
} else {
answeredPluginName = answeredPluginName.trim();
}
const pluginExist: string = glob
.sync(["node_modules/webpack/lib/*Plugin.js", "node_modules/webpack/lib/**/*Plugin.js"])
Expand Down

0 comments on commit 20ff530

Please sign in to comment.