chore: add typecheck

This commit is contained in:
Ou 2024-10-20 20:29:08 +08:00
parent 63db52fb9a
commit 175db9bb17
3 changed files with 5 additions and 3 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ dist/
.wrangler
.env
.env.*
dev-dist
dev-dist
*.tsbuildinfo

View File

@ -13,12 +13,13 @@
"homepage": "https://github.com/ourongxing/newsnow",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"build": "nr typecheck && vite build",
"lint": "eslint",
"favicon": "tsx ./scripts/favicon.ts",
"start": "PORT=4444 node --env-file .env.server dist/output/server/index.mjs",
"preview": "CF_PAGES=1 pnpm run build && wrangler pages dev",
"deploy": "CF_PAGES=1 pnpm run build && wrangler pages deploy",
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.app.json",
"release": "bumpp",
"prepare": "simple-git-hooks",
"log": "wrangler pages deployment tail --project-name newsnow",

View File

@ -12,9 +12,9 @@ import { VitePWA } from "vite-plugin-pwa"
import { projectDir } from "./shared/dir"
const isCF = process.env.CF_PAGES
dotenv.config({
path: join(projectDir, ".env.server"),
})
const pwaOption: Partial<VitePWAOptions> = {