Skip to content

Commit 6a40352

Browse files
committed
chore: extend typecheck to config
1 parent b4623ba commit 6a40352

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/client/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"noEmit": true,
2121
"jsx": "react-jsx"
2222
},
23-
"include": ["./src"]
23+
"include": ["./src", "*.config.ts"]
2424
}

packages/client/vite.config.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import react from "@vitejs/plugin-react"
22
import { existsSync, readdirSync, statSync } from "fs"
33
import path, { resolve } from "path"
4+
import { InputOption } from "rollup"
45
import modulepreload from "rollup-plugin-modulepreload"
56
import { injectManifest } from "rollup-plugin-workbox"
67
import Unfonts from "unplugin-fonts/vite"
@@ -121,7 +122,7 @@ function indexSwitchPlugin(target: string): Plugin {
121122
try {
122123
statSync(candidate)
123124
return candidate
124-
} catch (e) {
125+
} catch (_) {
125126
return null
126127
}
127128
},
@@ -337,7 +338,7 @@ const generateHydraUrl = (env: string) => {
337338
}
338339

339340
// Main Ref: https://vitejs.dev/config/
340-
const setConfig: (env: ConfigEnv) => UserConfigExport = ({ mode, command }) => {
341+
const setConfig: (env: ConfigEnv) => UserConfigExport = ({ mode }) => {
341342
const externalEnv = {
342343
...loadEnv(mode, process.cwd()),
343344
...process.env,
@@ -352,7 +353,6 @@ const setConfig: (env: ConfigEnv) => UserConfigExport = ({ mode, command }) => {
352353

353354
const buildTarget: BuildTarget = (process.env.TARGET as BuildTarget) || "web"
354355
const isDev = mode === "development"
355-
const isServe = command === "serve"
356356
// quick look-up (not using isServe atm, but expecting to optimise plugins later)
357357
// - vite .. isDev: true isServe: true (building with esbuild AND serving)
358358
// - vite preview .. isDev: false isServe: true (just running static, so don't need any plugins etc.)
@@ -386,7 +386,7 @@ const setConfig: (env: ConfigEnv) => UserConfigExport = ({ mode, command }) => {
386386

387387
plugins.push(fontFacePreload)
388388

389-
const input = {
389+
const input: InputOption = {
390390
main: resolve(__dirname, "index.html"),
391391
}
392392
if (buildTarget === "openfin") {

0 commit comments

Comments
 (0)