Skip to content

Commit

Permalink
fix(core): Fixed condition for using barrel import in split-tags
Browse files Browse the repository at this point in the history
…mode (#1122)
  • Loading branch information
soartec-lab authored Dec 28, 2023
1 parent 03002fa commit 0a747c7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/core/src/writers/split-tags-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ export const writeSplitTagsMode = async ({
upath.relativeSafe(dirname, getFileInfo(output.schemas).dirname)
: '../' + filename + '.schemas';

const importsForBuilder = output.schemas
? uniqBy(imports, 'name').map((i) => ({
exports: [i],
dependency: upath.join(relativeSchemasPath, camel(i.name)),
}))
: [{ exports: imports, dependency: relativeSchemasPath }];
const importsForBuilder =
output.schemas && !output.indexFiles
? uniqBy(imports, 'name').map((i) => ({
exports: [i],
dependency: upath.join(relativeSchemasPath, camel(i.name)),
}))
: [{ exports: imports, dependency: relativeSchemasPath }];

implementationData += builder.imports({
client: output.client,
Expand Down

0 comments on commit 0a747c7

Please sign in to comment.