From 3d89779866e5816c9210f3cef2ae0e9eb2f8ac92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Ramette?= Date: Mon, 9 Mar 2026 14:22:55 +0100 Subject: [PATCH] fix: use ESM format in esbuild output The package.json declares "type": "module" but esbuild was configured with format: 'cjs', producing a CommonJS bundle that fails at runtime in ESM projects with "module is not defined in ES module scope". Co-Authored-By: Claude Opus 4.6 --- esbuild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbuild.js b/esbuild.js index 67eb8a0..b6db3fd 100755 --- a/esbuild.js +++ b/esbuild.js @@ -10,7 +10,7 @@ esbuild minify: true, treeShaking: true, platform: 'node', - format: 'cjs', + format: 'esm', target: 'node18', plugins: [nodeExternalsPlugin()], })