From 34f09868f336f79ccf1a1f8f30a07953db473ddd Mon Sep 17 00:00:00 2001 From: HerozDotExe Date: Wed, 19 Nov 2025 11:54:06 +0100 Subject: [PATCH] fix: fix dynamic require of fs is not supported with adm-zip --- tsup.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tsup.config.js b/tsup.config.js index 19ae0b2..515664b 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -4,5 +4,8 @@ export default defineConfig({ entry: ["src/index.ts"], target: "node22", format: ["cjs", "esm"], - dts: true + dts: true, + banner: { + js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);", + }, });