Skip to content

Commit

Permalink
fix(nest): require typescript lazily in library generator
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed May 29, 2023
1 parent 79086f7 commit 6b73a47
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Tree } from '@nx/devkit';
import { addGlobal, removeChange } from '@nx/js';
import { ensureTypescript } from '@nx/js/src/utils/typescript/ensure-typescript';
import * as ts from 'typescript';
import type { NormalizedOptions } from '../schema';

let tsModule: typeof import('typescript');
Expand All @@ -24,7 +23,7 @@ export function addExportsToBarrelFile(

// find the export in the source file
const exportStatement = sourceFile.statements.find((statement) =>
ts.isExportDeclaration(statement)
tsModule.isExportDeclaration(statement)
);

sourceFile = removeChange(
Expand Down

0 comments on commit 6b73a47

Please sign in to comment.