Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"dev": "vite",
"build:plugin": "tsc -p tsconfig.plugin.json",
"build": "tsc && vite build && pnpm build:plugin",
"type-check": "tsc --noEmit",
"type-check": "tsc --noEmit && tsc -b tsconfig.node.json --force",
"lint": "eslint .",
"build:analyze": "pnpm build && echo 'Bundle analysis available at dist/stats.html'",
"preview": "vite preview",
Expand Down
18 changes: 17 additions & 1 deletion apps/console/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
{
"compilerOptions": {
"composite": true,
/* This project exists to be type-checked, not to ship anything: its output
is thrown away. It cannot say `noEmit` — `tsconfig.json` references it,
and a referenced project that disables emit is TS6310 — so instead the
emit is aimed at a gitignored cache directory. Left at the default it
writes .js/.d.ts next to every input (apps/console/vite.config.js,
scripts/vite-*.d.ts, …), and that untracked litter is a large part of why
this project was never wired into a gate (objectui#3305). */
"outDir": "../../node_modules/.cache/tsc/console-node",
/* `composite` defaults `rootDir` to this file's own directory, which would
put `../../scripts/vite-*.ts` outside it (TS6059). The project genuinely
spans both, so name the repo root explicitly. */
"rootDir": "../..",
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts", "vitest.setup.ts"]
/* `../../scripts/vite-*.ts` are the repo-level Vite plugins vite.config.ts
imports. They must be listed here or each one is a TS6307 ("not listed
within the file list of project") — the error that kept this project red,
and therefore ungated. */
"include": ["vite.config.ts", "vitest.setup.ts", "../../scripts/vite-*.ts"]
}
17 changes: 14 additions & 3 deletions apps/console/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { defineConfig } from 'vite';
// `defineConfig` comes from `vitest/config`, not `vite` — this file carries a
// `test` block (consumed by `vitest.config.ts`, which merges this config), and
// `vite`'s own `UserConfigExport` has no `test` property. Importing it from
// `vite` left that whole block unchecked (objectui#3305).
import { defineConfig } from 'vitest/config';
import type { Plugin } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
Expand Down Expand Up @@ -185,13 +189,20 @@ export default defineConfig({
// Gzip/Brotli compression & bundle visualizer are skipped on Vercel/CI to
// reduce memory usage — Vercel's CDN compresses assets automatically.
...(!isCI ? [
// `algorithms` (plural, an array) is the key vite-plugin-compression2
// declares. The singular `algorithm` used here before was never read: it
// fell through to the plugin's default, which is BOTH
// `['gzip', 'brotliCompress']` — so each of these two instances was
// compressing every asset twice, and the `.gz`/`.br` pair that made the
// build look correct came from the default, not from these options
// (objectui#3305).
compression({
algorithm: 'gzip',
algorithms: ['gzip'],
exclude: [/\.(br)$/, /\.(gz)$/],
threshold: 1024,
}),
compression({
algorithm: 'brotliCompress',
algorithms: ['brotliCompress'],
exclude: [/\.(br)$/, /\.(gz)$/],
threshold: 1024,
}),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"typedoc-plugin-markdown": "^4.12.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.65.0",
"vite": "^8.2.0",
"vite-plugin-compression2": "^2.5.3",
"vitest": "^4.1.10",
"vitest-axe": "^0.1.0",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
"type-check": {
"dependsOn": ["^build"],
"outputs": [],
"cache": true
"cache": true,
"inputs": [
"$TURBO_DEFAULT$",
"$TURBO_ROOT$/scripts/vite-*.ts"
]
},
"clean": {
"cache": false
Expand Down
Loading