From 5fab4206acdbb1c24cac0644d928300b8cf951c1 Mon Sep 17 00:00:00 2001 From: "Alexander J. Vincent" Date: Sat, 15 Jun 2024 21:32:57 -0700 Subject: [PATCH] fix: #11, basic subpath import support --- src/hooks/hooks.mts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hooks/hooks.mts b/src/hooks/hooks.mts index 8b7dd39..2d8dc1f 100644 --- a/src/hooks/hooks.mts +++ b/src/hooks/hooks.mts @@ -6,7 +6,7 @@ import type { LoadHook, ResolveHook, } from 'node:module' -import { resolve as pathResolve, dirname } from 'node:path' +import { resolve as pathResolve, dirname, relative } from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' import { format } from 'node:util' import { MessagePort } from 'node:worker_threads' @@ -14,7 +14,6 @@ import { classifyModule } from '../classify-module.js' import { DaemonClient } from '../client.js' import { getDiagMode } from '../diagnostic-mode.js' import getPackageJSON from '../service/get-package-json.js' -import { relative } from 'path' // in some cases on the loader thread, console.error doesn't actually // print. sync write to fd 1 instead.