Files
homepage/svelte.config.js
Alexander Bocken c766e36b1e
All checks were successful
CI / update (push) Successful in 1m22s
minimal serving size reduction by using hashed css classes
2026-01-25 20:51:46 +01:00

29 lines
981 B
JavaScript

import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [vitePreprocess()],
compilerOptions: {
// Shorter CSS hash: "svelte-1abc123" (14 chars) → "abc12" (4 chars)
cssHash: ({ hash, css }) => `${hash(css).slice(0, 4)}`
},
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({
precompress: true // Enable brotli and gzip compression
}),
alias: {
$models: 'src/models',
$utils: 'src/utils'
}
}
};
export default config;