Files
Modrinth-plus/svelte.config.js

58 lines
1.5 KiB
JavaScript
Raw Normal View History

import {mdsvex} from 'mdsvex';
2022-03-09 22:18:22 -08:00
import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-static';
2022-03-07 21:55:31 -08:00
import preprocess from 'svelte-preprocess';
import sveltePreprocess from 'svelte-preprocess';
2022-03-09 23:17:28 -08:00
import Icons from 'unplugin-icons/vite';
import svelteSvg from '@poppanator/sveltekit-svg';
import examples from 'mdsvexamples/vite'
import sveld from './plugins/sveld.js'
import path from "path";
2022-03-07 21:55:31 -08:00
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
2022-03-09 22:18:22 -08:00
preprocess: [
preprocess({
postcss: true,
}),
mdsvex(mdsvexConfig),
],
2022-03-07 21:55:31 -08:00
kit: {
2022-03-13 23:10:58 -07:00
adapter: adapter(),
prerender: {
default: true,
onError: 'continue',
},
vite: {
plugins: [
svelteSvg(),
Icons({
compiler: 'svelte',
2022-03-13 23:10:58 -07:00
defaultClass: 'icon',
}),
examples,
sveld(),
],
resolve: {
alias: {
$lib: path.resolve('./src/lib'),
$routes: path.resolve('./src/routes'),
omorphia: path.resolve('./src/lib'),
},
},
build: {
rollupOptions: {
external: '/_app/COMPONENT_API.json'
}
}
},
2022-03-09 23:17:28 -08:00
},
2022-03-07 21:55:31 -08:00
};
export default config;