From a8b84229734fabb9c459690f6ef300ccdf5889ef Mon Sep 17 00:00:00 2001 From: Guz013 <43732358+Guz013@users.noreply.github.com> Date: Mon, 19 Jun 2023 14:25:59 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20mdsvex=20unplugin-svelte-?= =?UTF-8?q?components=20comp.=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed error between mdsvex and unplugin-svelte-components when transforming svelte files --- apps/www/package.json | 1 + apps/www/svelte.config.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/www/package.json b/apps/www/package.json index 91ee886..754c4a3 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -35,6 +35,7 @@ "sass": "^1.63.4", "svelte": "^3.59.1", "svelte-check": "^3.4.3", + "svelte-preprocess": "^5.0.4", "tslib": "^2.5.3", "typescript": "^5.1.3", "unocss": "^0.52.7", diff --git a/apps/www/svelte.config.js b/apps/www/svelte.config.js index 754bf00..410e9d2 100644 --- a/apps/www/svelte.config.js +++ b/apps/www/svelte.config.js @@ -1,19 +1,19 @@ import adapter from '@sveltejs/adapter-vercel'; -import { vitePreprocess } from '@sveltejs/kit/vite'; +import sveltePreprocess from 'svelte-preprocess'; import { mdsvex } from 'mdsvex'; import rhExternalLinks from 'rehype-external-links'; /** @type {import('@sveltejs/kit').Config} */ const config = { extensions: ['.svelte', '.svx', '.md'], - preprocess: [vitePreprocess(), mdsvex({ + preprocess: [sveltePreprocess(), mdsvex({ rehypePlugins: [ [rhExternalLinks, { target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer'], }], ], - extensions: ['.svelte', '.svx', '.md'], + extensions: ['.svx', '.md'], })], kit: { adapter: adapter(),