You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/svelte.config.js

32 lines
896 B

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. Checked like the rest.
config: (config) => {
config.include.push('../uix.aliases.js');
}
},
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) =>
filename.includes('node_modules') ? undefined : { runes: true }
}
};
export default config;

Powered by TurnKey Linux.