Skip to content

Commit b832b70

Browse files
committedMar 10, 2025
feat!: drop CJS, now it's ESM-only
1 parent fbd6a19 commit b832b70

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed
 

‎build.config.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@ export default defineBuildConfig({
1111
name: basename(i).slice(0, -3),
1212
})),
1313
clean: true,
14-
declaration: true,
14+
declaration: 'node16',
1515
rollup: {
16-
emitCJS: true,
1716
inlineDependencies: true,
18-
commonjs: {
19-
exclude: ['**/*.d.ts'],
20-
},
2117
},
2218
})

‎package.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
"url": "https://github.com/antfu-collective/ni/issues"
1616
},
1717
"exports": {
18-
".": {
19-
"import": "./dist/index.mjs",
20-
"require": "./dist/index.cjs"
21-
}
18+
".": "./dist/index.mjs"
2219
},
23-
"main": "./dist/index.cjs",
20+
"main": "./dist/index.mjs",
2421
"module": "./dist/index.mjs",
25-
"types": "./dist/index.d.ts",
22+
"types": "./dist/index.d.mts",
2623
"bin": {
2724
"ni": "bin/ni.mjs",
2825
"nci": "bin/nci.mjs",

0 commit comments

Comments
 (0)
Please sign in to comment.