diff options
Diffstat (limited to 'src/js/_codegen/build-modules.ts')
-rw-r--r-- | src/js/_codegen/build-modules.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/js/_codegen/build-modules.ts b/src/js/_codegen/build-modules.ts index 2e49dfffe..d72c89cd6 100644 --- a/src/js/_codegen/build-modules.ts +++ b/src/js/_codegen/build-modules.ts @@ -29,7 +29,13 @@ const internalRegistry = new Map(); // Build Registry for (let i = 0; i < moduleList.length; i++) { - const prefix = moduleList[i].startsWith("node/") ? "node:" : moduleList[i].startsWith("bun:") ? "bun/" : undefined; + const prefix = moduleList[i].startsWith("node/") + ? "node:" + : moduleList[i].startsWith("bun:") + ? "bun/" + : moduleList[i].startsWith("internal/") + ? "internal/" + : undefined; if (prefix) { const id = prefix + moduleList[i].slice(prefix.length).replaceAll(".", "/").slice(0, -3); internalRegistry.set(id, i); @@ -91,7 +97,7 @@ globalThis.requireTransformer = (specifier: string, from: string) => { return codegenRequireId(`${found}/*${path.relative(BASE, relativeMatch)}*/`); } - throw new Error(`Builtin Bundler: Could not resolve "${specifier}" in ${from}. These cannot be relative.`); + throw new Error(`Builtin Bundler: Could not resolve "${specifier}" in ${from}.`); }; // Preprocess builtins |