From 824af6524c6db0fa60270f08d5f1d338429ca56e Mon Sep 17 00:00:00 2001 From: autocommit Date: Wed, 29 Apr 2026 13:06:42 -0700 Subject: [PATCH] =?UTF-8?q?chore(config):=20=F0=9F=94=A7=20Update=20config?= =?UTF-8?q?uration=20defaults=20for=20new=20environment=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .project/designs/app/.gitignore | 10 ++++++++++ .project/designs/app/tsconfig.json | 5 ++++- .project/designs/app/vite.config.ts | 30 +++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 .project/designs/app/.gitignore diff --git a/.project/designs/app/.gitignore b/.project/designs/app/.gitignore new file mode 100644 index 00000000..58a87693 --- /dev/null +++ b/.project/designs/app/.gitignore @@ -0,0 +1,10 @@ +# Vite cache + build output (regenerable, not source). +node_modules/ +.vite/ +dist/ + +# Stray emitted JS — sources are .ts/.tsx; tsc must run with --noEmit. +# These files broke the dev server's import resolution once already +# (Vite picked .js over .tsx siblings). Keep them out of the tree. +src/**/*.js +src/**/*.js.map diff --git a/.project/designs/app/tsconfig.json b/.project/designs/app/tsconfig.json index d72b8346..e6a12339 100644 --- a/.project/designs/app/tsconfig.json +++ b/.project/designs/app/tsconfig.json @@ -11,10 +11,13 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, + "noEmit": true, "resolveJsonModule": true, "baseUrl": ".", "paths": { - "@game-data/*": ["../../../public/games/age-of-dwarves/data/*"] + "@game-data/*": ["../../../public/games/age-of-dwarves/data/*"], + "@game-assets/*": ["../../../public/games/age-of-dwarves/assets/*"], + "@audio-alts/*": ["../../../.local/audio-alternatives/*"] } }, "include": ["src", "../../../public/games/age-of-dwarves/data/audio.json"] diff --git a/.project/designs/app/vite.config.ts b/.project/designs/app/vite.config.ts index 630b27d2..3c86e51c 100644 --- a/.project/designs/app/vite.config.ts +++ b/.project/designs/app/vite.config.ts @@ -4,10 +4,36 @@ import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], - server: { port: 7777 }, resolve: { alias: { - "@game-data": path.resolve(__dirname, "../../../public/games/age-of-dwarves/data"), + "@game-data": path.resolve(__dirname, "../../../public/games/age-of-dwarves/data"), + "@game-assets": path.resolve(__dirname, "../../../public/games/age-of-dwarves/assets"), + // Shared cross-theme resources (audio lives here, not under any one game). + "@resources": path.resolve(__dirname, "../../../public/resources"), + "@audio-alts": path.resolve(__dirname, "../../../.local/audio-alternatives"), + "@audio-staging": path.resolve(__dirname, "../../../.local/audio-staging"), + }, + }, + server: { + port: 7777, + fs: { + // Allow Vite to serve files from the parent project tree (assets + + // data live outside the design app's own root). + allow: [ + path.resolve(__dirname), + path.resolve(__dirname, "../../../public"), + path.resolve(__dirname, "../../../.local/audio-alternatives"), + path.resolve(__dirname, "../../../.local/audio-staging"), + ], + }, + watch: { + // import.meta.glob bakes its result at module-eval time. When new + // .ogg files appear under public/resources/audio after the module + // first loaded, the glob doesn't see them and the design page + // misses their play buttons. Telling Vite's watcher to track the + // shared audio dir triggers an HMR reload of the AudioSystem module + // when files are added/removed there, which re-evaluates the glob. + ignored: ["!**/public/resources/audio/**"], }, }, });