Skip to content

Commit

Permalink
fix: svelte ssr dev mode (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinderoubaix authored Nov 22, 2024
1 parent bedfbb2 commit 84a5493
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion svelte/ssr-app/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import adapter from '@sveltejs/adapter-auto';
import {vitePreprocess} from '@sveltejs/vite-plugin-svelte';
import {directivesPreprocess} from '@agnos-ui/svelte-preprocess';

const preprocess = [vitePreprocess()];

if (process.env.NODE_ENV === 'development') {
preprocess.push(directivesPreprocess());
}

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [vitePreprocess()],
preprocess,

kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
Expand Down

0 comments on commit 84a5493

Please sign in to comment.