web: use svelte-preprocess instead of vitePreprocess

this allows us to use <style src={...}></style> also for scoped styles
(and not just global styles)
This commit is contained in:
dumbmoron
2024-07-21 10:06:16 +00:00
parent 0cea58922d
commit 20320c1935
3 changed files with 76 additions and 32 deletions

View File

@ -1,8 +1,8 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
import { sveltePreprocess } from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
@ -10,7 +10,7 @@ const config = {
// for more information about preprocessors
extensions: [".svelte", ".md"],
preprocess: [
vitePreprocess(),
sveltePreprocess(),
mdsvex({
extensions: ['.md'],
layout: join(