fix(runner): define descriptor bundle module URL

This commit is contained in:
Dotta 2026-09-02 18:40:38 -05:00
parent d414396011
commit 16e165d958
1 changed files with 7 additions and 2 deletions

View File

@ -68,12 +68,17 @@ export async function bundleVerifiedProviderEntrypoints({ write = true } = {}) {
treeShaking: true,
write,
logLevel: "silent",
banner:
format === "cjs"
? {
js: 'const __paperclipVerifiedEntrypointUrl = require("node:url").pathToFileURL(__filename).href;',
}
: undefined,
define:
format === "cjs"
? {
"import.meta.dirname": "__dirname",
"import.meta.url":
'require("node:url").pathToFileURL(__filename).href',
"import.meta.url": "__paperclipVerifiedEntrypointUrl",
}
: undefined,
});