switched to hono/jwt to save some kb

This commit is contained in:
dswbx
2024-11-25 17:54:26 +01:00
parent 16a6a3315d
commit 1c94777317
7 changed files with 49 additions and 41 deletions

View File

@@ -8,17 +8,20 @@ const result = await esbuild.build({
conditions: ["worker", "browser"],
entryPoints: ["./src/index.ts"],
outdir: "dist",
external: [],
external: ["__STATIC_CONTENT_MANIFEST", "cloudflare:workers"],
format: "esm",
target: "es2022",
keepNames: true,
bundle: true,
metafile: true,
minify: true,
loader: {
".html": "copy"
},
define: {
IS_CLOUDFLARE_WORKER: "true"
}
});
await Bun.write("dist/meta.json", JSON.stringify(result.metafile));
//console.log("result", result.metafile);
await $`gzip dist/index.js -c > dist/index.js.gz`;