Skip to content

Commit 406a3d8

Browse files
authored
fix(register): Windows path (#906)
For windows users for some reason in some import relative "./importname" the files inside the join was resulting in ".file:..." Generating error, so I just moved the file:// out of the path, ensuring that it would look correctly and work on Windows
1 parent 6cdcf2c commit 406a3d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/register/esm.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
217217
// local project file
218218
if (path && isPathNotInNodeModules(path)) {
219219
debug('resolved: typescript', specifier, path)
220-
const url = new URL(join('file://', path))
220+
const url = new URL('file://' + join(path))
221221
return addShortCircuitSignal({
222222
...context,
223223
url: url.href,

0 commit comments

Comments
 (0)