diff --git a/package.json b/package.json index 8abb044..a4e3d50 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,10 @@ "import": { "node": "./dist/index.js", "default": "./dist/index.js" + }, + "require": { + "node": "./dist/index.cjs", + "default": "./dist/index.cjs" } } }, diff --git a/tsconfig.json b/tsconfig.json index 43abd60..a484180 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,4 +11,4 @@ "resolveJsonModule": true, }, "exclude": ["node_modules"] -} +} \ No newline at end of file diff --git a/tsup.config.ts b/tsup.config.ts index 25564ef..a90cf34 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ "safari17", "node20", ], - format: ["esm"], + format: ["esm", "cjs"], skipNodeModulesBundle: true, external: ["node_modules"], });