try esm action

This commit is contained in:
Pullfrog Action
2025-11-06 19:00:07 -05:00
parent 5a21d40d27
commit 7ef44eb254
9 changed files with 86 additions and 410 deletions
+6 -3
View File
@@ -5,13 +5,16 @@ import { build } from "esbuild";
await build({
entryPoints: ["./entry.ts"],
bundle: true,
outfile: "./entry.cjs",
format: "cjs",
outfile: "./entry.js",
format: "esm",
platform: "node",
target: "node20",
minify: true,
sourcemap: false,
// Mark optional peer dependencies as external to avoid bundling errors
// Mark all node_modules as external - Node.js will handle ESM/CJS interop natively
// This avoids esbuild's require() polyfill which doesn't work in ESM
packages: "external",
// Mark optional peer dependencies as external
external: [
"@valibot/to-json-schema",
"effect",