Skip to content

Commit 6123e5d

Browse files
chore: update Typescript config
1 parent 0dfa06e commit 6123e5d

4 files changed

Lines changed: 22 additions & 23 deletions

File tree

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "1.0.0",
44
"private": false,
55
"license": "MIT",
6-
"main": "lib/NMRiumWrapper.js",
7-
"module": "lib/NMRiumWrapper.js",
6+
"type": "module",
7+
"exports": "./lib/NMRiumWrapper.js",
88
"files": [
99
"lib"
1010
],
@@ -20,8 +20,7 @@
2020
"nmr-load-save": "^3.1.2",
2121
"nmr-processing": "^16.0.1",
2222
"nmrium": "^0.60.1-pre.1741337420",
23-
"react-science": "^14.0.0",
24-
"vite-plugin-pwa": "^0.21.1"
23+
"react-science": "^14.0.0"
2524
},
2625
"scripts": {
2726
"start": "vite --host localhost --port 3000 --open",
@@ -31,8 +30,8 @@
3130
"test": "jest --coverage",
3231
"eslint": "eslint . --cache",
3332
"eslint-fix": "npm run eslint -- --fix",
34-
"compile": "tsc --project tsconfig.esm.json",
35-
"check-types": "tsc --project tsconfig.esm.json",
33+
"compile": "tsc --project tsconfig.build.json",
34+
"check-types": "tsc --noEmit",
3635
"prettier": "prettier --check src",
3736
"prettier-write": "prettier --write src",
3837
"test-e2e": "playwright test --project chromium",
@@ -61,6 +60,7 @@
6160
"react-router-dom": "^7.3.0",
6261
"serve": "^14.2.4",
6362
"typescript": "^5.8.2",
64-
"vite": "^6.2.1"
63+
"vite": "^6.2.1",
64+
"vite-plugin-pwa": "^0.21.1"
6565
}
66-
}
66+
}
File renamed without changes.

tsconfig.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@
22
"compilerOptions": {
33
"target": "ES2020",
44
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
5+
"DOM",
6+
"ES2022"
87
],
98
"types": [
10-
"vite/client"
9+
"vite/client",
10+
"vite-plugin-pwa/client.d.ts"
1111
],
12+
"outDir": "lib",
1213
"allowJs": false,
13-
"skipLibCheck": true,
14-
"esModuleInterop": true,
15-
"allowSyntheticDefaultImports": true,
1614
"strict": true,
1715
"noImplicitAny": false,
1816
"forceConsistentCasingInFileNames": true,
1917
"noFallthroughCasesInSwitch": true,
20-
"moduleResolution": "Bundler",
21-
"module": "ES2022",
18+
"module": "NodeNext",
2219
"resolveJsonModule": true,
2320
"isolatedModules": true,
2421
"noEmit": true,
25-
"jsx": "react-jsx"
22+
"jsx": "react-jsx",
23+
"verbatimModuleSyntax": true,
24+
"sourceMap": true,
25+
"declaration": true,
26+
"declarationMap": true,
27+
"skipLibCheck": true,
2628
},
2729
"include": [
2830
"src",
2931
"test-e2e",
3032
"playwright.config.ts",
31-
"vite.config.ts"
33+
"vite.config.ts",
3234
],
33-
"exclude": [
34-
"node_modules"
35-
]
3635
}

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import react from '@vitejs/plugin-react-swc';
22
import { defineConfig } from 'vite';
3-
import { VitePWA, Options } from 'vite-plugin-pwa';
3+
import { VitePWA, type Options } from 'vite-plugin-pwa';
44

55
const pwaSettings: Partial<Options> = {
66
// cache all the imports

0 commit comments

Comments
 (0)