web: type process.env in vite.config (add @types/node)

The previous commit's vite.config.ts used process.env without Node types, so
svelte-check failed. Adds @types/node and includes "node" in tsconfig types.
svelte-check is back to 0 errors, 0 warnings.
This commit is contained in:
mithral 2026-10-10 16:33:05 -04:00
parent 7754b0f504
commit e21661460a
3 changed files with 30 additions and 13 deletions

View file

@ -15,6 +15,7 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@types/node": "^26.6.5",
"svelte": "^5.19.0",
"svelte-check": "^4.1.4",
"typescript": "^5.7.3",

40
web/pnpm-lock.yaml generated
View file

@ -17,7 +17,10 @@ importers:
devDependencies:
'@sveltejs/vite-plugin-svelte':
specifier: ^5.0.3
version: 5.1.1(svelte@5.57.2)(vite@6.4.4)
version: 5.1.1(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5))
'@types/node':
specifier: ^26.6.5
version: 26.6.5
svelte:
specifier: ^5.19.0
version: 5.57.2
@ -29,7 +32,7 @@ importers:
version: 5.9.3
vite:
specifier: ^6.0.7
version: 6.4.4
version: 6.4.4(@types/node@26.6.5)
packages:
@ -456,6 +459,9 @@ packages:
resolution: {integrity: sha512-tJxahnjm9dEI1X+hQSC5f2BSd/coZaqbIl1m3TCl0q9SVuC52XcXfV0XmoCU1+PmjyucuVITwoTnN8OlTbEXXA==}
deprecated: This is a stub types definition for localforage (https://github.com/localForage/localForage). localforage provides its own type definitions, so you don't need @types/localforage installed!
'@types/node@26.6.5':
resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}
'@xmldom/xmldom@0.7.13':
resolution: {integrity: sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==}
engines: {node: '>=10.0.0'}
@ -694,6 +700,9 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
undici-types@8.9.0:
resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
@ -979,25 +988,25 @@ snapshots:
'@sveltejs/load-config@0.2.3': {}
'@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4))(svelte@5.57.2)(vite@6.4.4)':
'@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5)))(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5))':
dependencies:
'@sveltejs/vite-plugin-svelte': 5.1.1(svelte@5.57.2)(vite@6.4.4)
'@sveltejs/vite-plugin-svelte': 5.1.1(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5))
debug: 4.4.3
svelte: 5.57.2
vite: 6.4.4
vite: 6.4.4(@types/node@26.6.5)
transitivePeerDependencies:
- supports-color
'@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4)':
'@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5))':
dependencies:
'@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4))(svelte@5.57.2)(vite@6.4.4)
'@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5)))(svelte@5.57.2)(vite@6.4.4(@types/node@26.6.5))
debug: 4.4.3
deepmerge: 4.3.1
kleur: 4.1.5
magic-string: 0.30.21
svelte: 5.57.2
vite: 6.4.4
vitefu: 1.1.3(vite@6.4.4)
vite: 6.4.4(@types/node@26.6.5)
vitefu: 1.1.3(vite@6.4.4(@types/node@26.6.5))
transitivePeerDependencies:
- supports-color
@ -1007,6 +1016,10 @@ snapshots:
dependencies:
localforage: 1.10.0
'@types/node@26.6.5':
dependencies:
undici-types: 8.9.0
'@xmldom/xmldom@0.7.13': {}
acorn@8.19.0: {}
@ -1295,9 +1308,11 @@ snapshots:
typescript@5.9.3: {}
undici-types@8.9.0: {}
util-deprecate@1.0.2: {}
vite@6.4.4:
vite@6.4.4(@types/node@26.6.5):
dependencies:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.7)
@ -1306,10 +1321,11 @@ snapshots:
rollup: 4.64.3
tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 26.6.5
fsevents: 2.3.3
vitefu@1.1.3(vite@6.4.4):
vitefu@1.1.3(vite@6.4.4(@types/node@26.6.5)):
optionalDependencies:
vite: 6.4.4
vite: 6.4.4(@types/node@26.6.5)
zimmerframe@1.1.5: {}

View file

@ -4,7 +4,7 @@
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["svelte", "vite/client"],
"types": ["svelte", "vite/client", "node"],
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,