Skip to content

Commit 22f325e

Browse files
committed
refactor: enable cjsInterop
1 parent 17940bb commit 22f325e

File tree

5 files changed

+15
-33
lines changed

5 files changed

+15
-33
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"scripts": {
8484
"lint": "eslint --cache .",
8585
"lint:fix": "pnpm run lint --fix",
86-
"build": "tsup && tsx scripts/postbuild.mts",
86+
"build": "tsup",
8787
"dev": "tsup --watch",
8888
"test": "vitest",
8989
"release": "bumpp && pnpm publish",
@@ -105,7 +105,7 @@
105105
"eslint-define-config": "^1.22.0",
106106
"fast-glob": "^3.3.1",
107107
"prettier": "^3.0.0",
108-
"tsup": "^7.1.0",
108+
"tsup": "^7.2.0",
109109
"tsx": "^3.12.7",
110110
"typescript": "^5.1.6",
111111
"vite": "^4.4.7",

pnpm-lock.yaml

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/postbuild.mts

-19
This file was deleted.

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
3-
"target": "es2021",
3+
"target": "es2022",
44
"module": "esnext",
5-
"lib": ["es2021"],
5+
"lib": ["es2022"],
66
"strict": true,
77
"esModuleInterop": true,
88
"moduleResolution": "bundler",

tsup.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { defineConfig } from 'tsup'
22

33
export default defineConfig({
4-
entry: ['./src'],
4+
entry: ['./src/*.ts'],
55
format: ['cjs', 'esm'],
66
target: 'node16.14',
77
splitting: true,
8+
cjsInterop: true,
89
clean: true,
910
dts: true,
1011
})

0 commit comments

Comments
 (0)