Files
cloudflare__vinext/vite.config.ts
T
Stephen Zhou 25f6e0fc87 chore: enable typeAware and typeCheck, use vp check (#551)
* chore: enable typeAware and typeCheck, use vp check

* Build

* Try cache false

* Revert "Try cache false"

This reverts commit 5f76ed02f1.

* Update

* workaround for vp check

* Try no workaround

* Fix check

* Update to 0.1.12

* denyWarnings
2026-03-16 11:00:47 -05:00

48 lines
1.4 KiB
TypeScript

import { defineConfig } from "vite-plus";
import { randomUUID } from "node:crypto";
export default defineConfig({
staged: {
"*": "vp check --fix",
},
fmt: {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: "all",
ignorePatterns: ["tests/fixtures/ecosystem/**", "examples/**"],
},
lint: {
ignorePatterns: [
"fixtures/ecosystem/**",
"tests/fixtures/**",
"tests/fixtures/ecosystem/**",
"examples/**",
],
options: {
typeAware: true,
typeCheck: true,
denyWarnings: true,
},
},
test: {
include: ["tests/**/*.test.ts"],
testTimeout: 30000,
env: {
// Mirrors the Vite `define` in index.ts that inlines a build-time UUID.
// Setting it here means tests exercise the same code path as production.
__VINEXT_DRAFT_SECRET: randomUUID(),
},
// Multiple suites spin up Vite dev servers against the same fixture dirs.
// Running test files in parallel can race on Vite's deps optimizer cache
// (node_modules/.vite/*) and produce "outdated pre-bundle" 500s.
fileParallelism: false,
// GitHub Actions reporter adds inline failure annotations in PR diffs.
// It's auto-enabled with the default reporter, but being explicit ensures
// it survives any future reporter config changes.
reporters: process.env.CI ? ["default", "github-actions"] : ["default"],
},
});