import adapter from '@sveltejs/adapter-static'; import { dirname } from 'path'; import { resolveUixAliases } from './uix.aliases.js'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { adapter: adapter({ fallback: '200.html' }), files: { routes: 'web/routes' }, // ONE table (`uix.aliases.js`), shared with vite.config.ts and the scripts. alias: resolveUixAliases(__dirname), typescript: { // Kit's generated include lists routes, lib and src — not the root module // every tool now imports, nor the tooling in scripts/. Checked like the rest; // agent probes (`scripts/__*`) are excluded in tsconfig.json. config: (config) => { config.include.push('../uix.aliases.js'); config.include.push('../scripts/**/*.ts'); } } }, vitePlugin: { dynamicCompileOptions: ({ filename }) => filename.includes('node_modules') ? undefined : { runes: true } } }; export default config;