chore: update Cloudflare proxy build target to ESNext and adjust package import handling

Set the build target for the Cloudflare adapter to ESNext to keep json import attribute.
This commit is contained in:
dswbx
2025-10-01 09:00:11 +02:00
parent eecaeb7c06
commit ba9713587c
2 changed files with 4 additions and 1 deletions

View File

@@ -20,7 +20,9 @@ export type WithPlatformProxyOptions = {
async function getPlatformProxy(opts?: GetPlatformProxyOptions) {
try {
const { version } = await import("wrangler/package.json", { with: { type: "json" } });
const { version } = await import("wrangler/package.json", { with: { type: "json" } }).then(
(pkg) => pkg.default,
);
$console.log("Using wrangler version", version);
const { getPlatformProxy } = await import("wrangler");
return getPlatformProxy(opts);