blog/svelte.config.js

33 lines
1.0 KiB
JavaScript
Raw Normal View History

import { resolve } from 'node:path';
import staticAdapter from '@sveltejs/adapter-static';
2023-12-27 04:30:09 +00:00
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
2023-08-27 03:55:35 +00:00
import { mdsvex } from 'mdsvex';
import { localRemark } from './src/plugins/remark.js';
import { localRehype } from './src/plugins/rehype.js';
2021-10-18 04:05:23 +00:00
2023-08-27 03:55:35 +00:00
/** @type {import('@sveltejs/kit').Config} */
2021-10-18 04:05:23 +00:00
const config = {
2022-05-12 03:41:23 +00:00
extensions: ['.svelte', '.svx'],
preprocess: [
mdsvex({
layout: './src/lib/Post.svelte',
remarkPlugins: [localRemark],
rehypePlugins: [localRehype],
2022-05-12 03:41:23 +00:00
}),
2023-12-27 04:30:09 +00:00
vitePreprocess(),
2022-05-12 03:41:23 +00:00
],
kit: {
2023-08-27 03:55:35 +00:00
// 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.
2022-05-12 03:41:23 +00:00
adapter: staticAdapter(),
alias: {
'$styles': 'src/styles',
}
2022-05-12 03:41:23 +00:00
}
2021-10-18 04:05:23 +00:00
};
export default config;