Skip to content

Commit

Permalink
chore: use replaceWith
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabh3112 committed May 31, 2019
1 parent 55d237b commit 6a7e662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/ast-utils.ts
Expand Up @@ -653,7 +653,7 @@ function parseMerge(j: JSCodeshift, ast: Node, value: string[], action: string):
`const ${configIdentifier} = require('${configPath}')`,
`const merge = require('webpack-merge')`
];
ast = addMergeImports(ast, mergeImports);
ast.replaceWith(addMergeImports(ast, mergeImports));
return ast.find(j.Program).filter((p: Node): boolean => createMergeProperty(p, configIdentifier));
} else {
return ast;
Expand Down

0 comments on commit 6a7e662

Please sign in to comment.