fix: 🐛 mdsvex unplugin-svelte-components comp. error

Fixed error between mdsvex and unplugin-svelte-components when
transforming svelte files
This commit is contained in:
Guz013
2023-06-19 14:25:59 -03:00
parent 85ed4ff9cf
commit a8b8422973
2 changed files with 4 additions and 3 deletions

View File

@@ -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",

View File

@@ -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(),