Skip to content

Commit b20cf70

Browse files
fix: build esm and not cjs
1 parent 31d31e5 commit b20cf70

3 files changed

Lines changed: 9 additions & 21 deletions

File tree

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"version": "0.4.0",
44
"private": false,
55
"license": "MIT",
6-
"main": "lib-cjs/NMRiumWrapper.js",
6+
"main": "lib/NMRiumWrapper.js",
77
"module": "lib/NMRiumWrapper.js",
88
"files": [
9-
"lib",
10-
"lib-cjs"
9+
"lib"
1110
],
1211
"volta": {
1312
"node": "20.2.0"
@@ -29,7 +28,7 @@
2928
"test": "jest --coverage",
3029
"eslint": "eslint . --cache",
3130
"eslint-fix": "npm run eslint -- --fix",
32-
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
31+
"compile": "tsc --project tsconfig.esm.json",
3332
"check-types": "tsc --project tsconfig.esm.json",
3433
"prettier": "prettier --check src",
3534
"prettier-write": "prettier --write src",
@@ -61,4 +60,4 @@
6160
"typescript": "^5.2.2",
6261
"vite": "^4.4.11"
6362
}
64-
}
63+
}

tsconfig.cjs.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

tsconfig.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"esnext"
88
],
99
"types": [
10-
"vite/client",
11-
"@types/jest",
12-
"vite-plugin-pwa/client"
10+
"vite/client"
1311
],
1412
"allowJs": false,
1513
"skipLibCheck": true,
@@ -19,17 +17,18 @@
1917
"noImplicitAny": false,
2018
"forceConsistentCasingInFileNames": true,
2119
"noFallthroughCasesInSwitch": true,
22-
"module": "node16",
20+
"moduleResolution": "Bundler",
21+
"module": "ES2022",
2322
"resolveJsonModule": true,
2423
"isolatedModules": true,
2524
"noEmit": true,
2625
"jsx": "react-jsx"
2726
},
2827
"include": [
2928
"src",
30-
"vite.config.ts",
3129
"test-e2e",
32-
"playwright.config.ts"
30+
"playwright.config.ts",
31+
"vite.config.ts"
3332
],
3433
"exclude": [
3534
"node_modules"

0 commit comments

Comments
 (0)