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
+1
View File
@@ -19,6 +19,7 @@
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-seo": "^1.6.0",
"sveltekit-html-minifier": "^1.0.3",
"svgo": "^3.2.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
+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,