Skip to content

Commit 4ef2866

Browse files
committed
Expose ./node sub-path export
`./core` has been inherited at the days this package was CJS, where the default exports was Node.js. The core allowed to import the functionality, which did not depend on the Node API. With ES Module implementation, it is the other way around. The non-Node is now the default. Therefor it make more sense expose the Node specific functionality, for those cases where conditional exports cannot be used. Such as the ``"moduleResolution": "bundler"` in TypeScript projects.
1 parent 6cc7408 commit 4ef2866

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
},
2727
"./core": {
2828
"types": "./core.d.ts",
29-
"import": "./core.js",
30-
"module-sync": "./core.js"
29+
"default": "./core.js"
30+
},
31+
"./node": {
32+
"types": "./index.d.ts",
33+
"default": "./index.js"
3134
}
3235
},
3336
"sideEffects": false,

0 commit comments

Comments
 (0)