Files
Modrinth-plus/svelte.config.js

49 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-05-20 00:10:45 -07:00
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-05-20 00:10:45 -07:00
import examples from 'mdsvexamples/vite';
import sveld from './plugins/sveld.js';
import path from 'path';
import { preprocess, plugins } from './src/package/config/svelte.config.js';
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
2022-05-20 00:10:45 -07:00
preprocess: [preprocess, 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: [
...plugins,
examples,
sveld(),
],
resolve: {
alias: {
$package: path.resolve('./src/package'),
$routes: path.resolve('./src/routes'),
omorphia: path.resolve('./src/package'),
},
},
build: {
rollupOptions: {
2022-05-20 00:10:45 -07:00
external: '/_app/COMPONENT_API.json',
},
},
},
files: {
lib: 'src/package',
2022-05-20 00:10:45 -07:00
},
2022-03-09 23:17:28 -08:00
},
2022-03-07 21:55:31 -08:00
};
export default config;