Skip to content

Commit

Permalink
🐞 fix: fix import err
Browse files Browse the repository at this point in the history
  • Loading branch information
gylove1994 committed Sep 25, 2024
1 parent 4060052 commit 47b1bfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gylove1994/npg",
"version": "0.2.0",
"version": "0.2.1",
"description": "A command line tool for nestjs-prisma code generation",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export function importFile(importName: string, useRelativePath = false) {
createdEnumMap.has(importName) ||
createdEnumMap.has(importName.toUpperCase())
) {
return `import { ${importName} } from "${useRelativePath ? "@entity/" : ""}${importName}Enum";\n`;
return `import { ${importName} } from "${useRelativePath ? "@entity/" : "./"}${importName}Enum";\n`;
}
return `import { ${importName} } from "${useRelativePath ? "@entity/" : ""}${importName}Entity";\n`;
return `import { ${importName} } from "${useRelativePath ? "@entity/" : "./"}${importName}Entity";\n`;
}

export function importApiProperty() {
Expand Down

0 comments on commit 47b1bfb

Please sign in to comment.