Skip to content

Commit 63e90d8

Browse files
43081jjerome-benoit
andauthoredMar 11, 2025··
feat!: esm-only (#253)
Co-authored-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
1 parent bb19ef0 commit 63e90d8

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed
 

‎.size-limit.json

-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
{
33
"path": "dist/index.js",
44
"limit": "12 kB"
5-
},
6-
{
7-
"path": "dist/index.cjs",
8-
"limit": "12 kB"
95
}
106
]

‎package.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@
2626
"release": "bumpp package.json --commit --push --tag",
2727
"test": "vitest --retry=5 --run"
2828
},
29-
"main": "./dist/index.cjs",
29+
"main": "./dist/index.js",
3030
"module": "./dist/index.js",
3131
"types": "./dist/index.d.ts",
3232
"exports": {
33-
"require": {
34-
"types": "./dist/index.d.cts",
35-
"require": "./dist/index.cjs"
36-
},
37-
"import": {
33+
".": {
3834
"types": "./dist/index.d.ts",
39-
"import": "./dist/index.js"
35+
"default": "./dist/index.js"
4036
}
4137
},
4238
"files": [

‎tsconfig.json

-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
"compilerOptions": {
33
"target": "ES2018",
44
"strict": true,
5-
"esModuleInterop": true,
65
"moduleResolution": "Bundler",
76
"noEmit": true,
87
"noUncheckedIndexedAccess": true,
9-
"baseUrl": ".",
108
"skipLibCheck": true,
119
"lib": []
1210
},

‎tsup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default defineConfig({
44
clean: true,
55
dts: true,
66
entry: ['src/index.ts'],
7-
format: ['esm', 'cjs'],
7+
format: ['esm'],
88
minify: false,
99
minifyIdentifiers: true,
1010
minifySyntax: true,

0 commit comments

Comments
 (0)