Files
continuwuity/packages/website/svelte.config.js
T

43 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-02-13 16:38:14 +00:00
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
2024-04-02 16:18:53 +01:00
import htmlMinifierAdaptor from "sveltekit-html-minifier";
2024-03-08 18:42:01 +00:00
import cspDirectives from './csp.js';
2024-02-13 16:38:14 +00:00
/** @type {import('@sveltejs/kit').Config} */
2024-04-02 16:18:53 +01:00
2024-02-13 16:38:14 +00:00
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
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:
// Disabled html min as it runs after precompress
// htmlMinifierAdaptor(
adapter(),
// {
// pages: "build/prerendered/",
// minifierOptions: {
// minifyURLs: true,
// // Because of CSP hashing
// minifyJS: false, // We can pass a function here
// collapseWhitespace: false,
// sortAttributes: true,
// sortClassName: true,
// removeRedundantAttributes: true
// }
// }),
2024-03-08 18:42:01 +00:00
csp: {
mode: "auto",
directives: cspDirectives,
},
2024-02-13 16:38:14 +00:00
}
};
export default config;