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/apps/base/svelte.config.js

29 lines
946 B

import adapter from '@sveltejs/adapter-static';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { resolveUixAliases } from '../../uix.aliases.js';
import { UIX_BOOT_CSP_HASH } from './src/generated/boot.js';
const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// No fallback: every route prerenders to a file, and one that cannot fails the build.
adapter: adapter(),
// The framework's ONE alias table (docs/consuming.md §2).
alias: resolveUixAliases(REPO_ROOT),
// The hash of THIS app's compiled boot, never the framework's own artifact.
csp: {
mode: 'hash',
directives: { 'script-src': ['self', UIX_BOOT_CSP_HASH] }
}
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) =>
filename.includes('node_modules') ? undefined : { runes: true }
}
};
export default config;

Powered by TurnKey Linux.