Skip to content

Commit

Permalink
fix(cli): fix windows path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Aug 19, 2021
1 parent 251197c commit 01bfd65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/bright-zebras-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/cli': patch
---

fix(cli): fix windows path issue
2 changes: 1 addition & 1 deletion packages/cli/src/commands/ts-artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function generateTsArtifacts({
}
if (isAbsolute(importPath)) {
moduleMapProp = relative(baseDir, importedModuleName);
importPath = `./${relative(artifactsDir, importedModuleName)}`;
importPath = `./${relative(artifactsDir, importedModuleName).split('\\').join('/')}`;
}
const importedModuleVariable = pascalCase(`ExternalModule$${i}`);
importCodes.push(`import ${importedModuleVariable} from '${importPath}';`);
Expand Down

0 comments on commit 01bfd65

Please sign in to comment.