Skip to content

Commit 1328150

Browse files
Add exports config to help commonjs with nodenext (#338)
1 parent 4d3b651 commit 1328150

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rapier-compat/rollup.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ const config = (dim, features_postfix) => ({
3737
config.types = "rapier.d.ts";
3838
config.main = "rapier.cjs";
3939
config.module = "rapier.mjs";
40+
config.exports = {
41+
".": {
42+
require: "./rapier.cjs",
43+
import: "./rapier.mjs",
44+
},
45+
};
4046
// delete config.module;
4147
config.files = ["*"];
4248
return JSON.stringify(config, undefined, 2);

0 commit comments

Comments
 (0)