소스 검색

fix(cli): Fix entity generation without translation

Michael Bromley 3 달 전
부모
커밋
d8e20de762
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      packages/cli/src/commands/add/entity/add-entity.ts

+ 1 - 0
packages/cli/src/commands/add/entity/add-entity.ts

@@ -189,6 +189,7 @@ function createEntity(plugin: VendurePluginRef, options: AddEntityOptions) {
         entityClass?.getProperty('translations')?.remove();
         removeImplementsFromClass('Translatable', entityClass);
         translationFile.delete();
+        entityFile.getImportDeclaration('./entity-translation.template')?.remove();
     } else {
         entityFile
             .getImportDeclaration('./entity-translation.template')