Skip to content

Commit c0ad21e

Browse files
committed
feat: add exports field to package.json for module compatibility
1 parent 747e33d commit c0ad21e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/rebrander.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ packageJSON.funding.unshift({
2121
});
2222
packageJSON.keywords = packageJSON.keywords.slice(2);
2323

24+
packageJSON.exports = {
25+
".": {
26+
types: "./dist/index.d.ts",
27+
import: "./dist/index.mjs",
28+
require: "./dist/index.js",
29+
},
30+
};
31+
2432
fs.writeFileSync(
2533
path.resolve(rootDir, "lib", "package.json"),
2634
JSON.stringify(packageJSON, null, 2),

0 commit comments

Comments
 (0)