fix: add CJS build for NestJS CommonJS compatibility
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
NestJS compiles to CommonJS, but the package only exported ESM. Node throws ERR_PACKAGE_PATH_NOT_EXPORTED when CJS code requires an ESM-only package. Added dual ESM/CJS build with proper exports conditions. - ESM output in dist/esm/, CJS output in dist/cjs/ - package.json exports now includes import, require, and default - Bumped to 0.1.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
9
tsconfig.cjs.json
Normal file
9
tsconfig.cjs.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./dist/cjs"
|
||||
},
|
||||
"exclude": ["node_modules", "dist", "tests", "**/*.test.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user