Skip to content

Commit

Permalink
fix: dynamic import writeFile() for browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Gumball12 committed Mar 9, 2024
1 parent 08b7fa1 commit 118c22b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/generateDtsFile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CreateDtsOptions, createDts } from './createDts';
import { writeFile } from './writeFile';

type GenerateDtsFileOptions = Partial<{
fileName: string;
Expand Down Expand Up @@ -32,5 +31,6 @@ export const generateDtsFile = async ({
return;
}

const { writeFile } = await import('./writeFile');
await writeFile(`${directory}/${fileName}.d.ts`, dts);
};

0 comments on commit 118c22b

Please sign in to comment.