diff --git a/src/build.ts b/src/build.ts index 7aca62902a..6f4a21e041 100644 --- a/src/build.ts +++ b/src/build.ts @@ -122,7 +122,9 @@ export async function writeTypes(nitro: Nitro) { // TODO: fully resolve utils exported from `#imports` autoImportExports = await nitro.unimport .toExports(typesDir) - .then((r) => r.replace(/#internal\/nitro/g, runtimeDir)); + .then((r) => + r.replace(/#internal\/nitro/g, relative(typesDir, runtimeDir)) + ); const resolvedImportPathMap = new Map(); const imports = await nitro.unimport