Add HTML minifier adapter

This commit is contained in:
Jade Ellis
2024-04-02 16:18:53 +01:00
parent 45d1a5aceb
commit 0244c9e778
3 changed files with 149 additions and 1 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import htmlMinifierAdaptor from "sveltekit-html-minifier";
import cspDirectives from './csp.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
@@ -11,7 +15,7 @@ const config = {
// 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(),
adapter: htmlMinifierAdaptor(adapter()),
csp: {
mode: "auto",
directives: cspDirectives,