fix removal of unused typeorm imports
This commit is contained in:
parent
f346c0b904
commit
314c0675f1
@ -73,7 +73,7 @@ function removeUnusedImports(rendered: string) {
|
||||
.split(",");
|
||||
const restOfEntityDefinition = rendered.substring(closeBracketIndex);
|
||||
const distinctImports = imports.filter(
|
||||
v => restOfEntityDefinition.indexOf(v) !== -1
|
||||
v => restOfEntityDefinition.indexOf(`@${v}(`) !== -1
|
||||
);
|
||||
return `${rendered.substring(0, openBracketIndex)}${distinctImports.join(
|
||||
","
|
||||
|
Loading…
Reference in New Issue
Block a user