Skip to content

Commit 2555452

Browse files
committed
fix: fix import path of postSetup on Windows
1 parent 8cf3c32 commit 2555452

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/create/handlers/LibrarySetup.handler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22
import fs from 'fs/promises';
3+
import * as URL from 'url';
34

45
import { copy } from 'fs-extra/esm';
56
import chalk from 'chalk';
@@ -52,7 +53,9 @@ export class LibrarySetupHandler extends BaseCommandHandler<CreateCommandInput>
5253

5354
try {
5455
const initImport = await import(
55-
path.join(templatesDir(), this.libraryType, this.libraryName, SCRIPTS_DIR_NAME, scriptName),
56+
URL.pathToFileURL(
57+
path.join(templatesDir(), this.libraryType, this.libraryName, SCRIPTS_DIR_NAME, scriptName),
58+
).toString()
5659
);
5760

5861
if (initImport?.default) {

0 commit comments

Comments
 (0)