From a314d65b1924de3b731dd89f16a79c98ac0e4858 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 24 Feb 2024 10:38:23 -0800 Subject: [PATCH] optimize: precompress assets with adapter --- svelte.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/svelte.config.js b/svelte.config.js index e4d39c3b..d39cf6b9 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -13,7 +13,10 @@ 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: process.env.ADAPTER == 'node' ? node() : process.env.ADAPTER == 'bun' ? bun() : vercel(), + adapter: process.env.ADAPTER == 'node' ? node() : process.env.ADAPTER == 'bun' ? bun({ + precompress: true, + + }) : vercel(), // csp: { // directives: { // 'script-src': ['self'],