Skip to content

Commit

Permalink
Fix moduleResolution:node16 CommonJS compatibility (adelsz#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored May 11, 2024
1 parent 354b5c2 commit 9693e1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"type": "module",
"exports": {
".": {
"types": "./lib/index.d.ts",
"types": {
"import": "./lib/index.d.ts",
"require": "./lib/index.d.cts",
"default": "./lib/index.d.ts"
},
"import": "./lib/index.js",
"require": "./lib/index.cjs",
"default": "./lib/index.js"
Expand All @@ -29,7 +33,7 @@
"scripts": {
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
"build:cjs": "esbuild --bundle --sourcemap --platform=node --target=node14 src/index.ts --minify --external:chalk --external:antlr4ts --outfile=lib/index.cjs",
"build": "tsc && npm run build:cjs",
"build": "tsc && npm run build:cjs && cp lib/index.d.ts lib/index.d.cts",
"check": "tsc --noEmit",
"watch": "tsc --watch --preserveWatchOutput"
},
Expand Down

0 comments on commit 9693e1b

Please sign in to comment.