Files
Modrinth-plus/svelte.config.js

65 lines
1.4 KiB
JavaScript
Raw Normal View History

import { mdsvex } from 'mdsvex'
import mdsvexConfig from './mdsvex.config.js'
import adapter from '@sveltejs/adapter-static'
import examples from 'mdsvexamples/vite'
2022-06-17 19:58:01 -07:00
import sveld from './docs/plugins/sveld.js'
import path from 'path'
import { preprocess, plugins } from './src/config/svelte.js'
2022-06-17 19:58:01 -07:00
import Generator from './src/plugins/generator/index.js'
2022-06-13 11:34:46 -07:00
import precompileIntl from 'svelte-intl-precompile/sveltekit-plugin'
2022-03-07 21:55:31 -08:00
/** @type {import('@sveltejs/kit').Config} */
2022-06-24 22:26:49 -07:00
export default {
extensions: ['.svelte', ...mdsvexConfig.extensions],
2022-03-09 22:18:22 -08:00
preprocess: [preprocess, mdsvex(mdsvexConfig)],
2022-03-07 21:55:31 -08:00
kit: {
adapter: adapter(),
prerender: {
default: true,
onError: 'continue',
},
alias: {
$generated: path.resolve('./generated'),
omorphia: path.resolve('./src'),
['$stores/account']: path.resolve('./docs/dummyStore.ts'),
},
vite: {
plugins: [
Generator({
gameVersions: true,
openapi: true,
}),
...plugins,
examples,
sveld(),
2022-06-13 11:34:46 -07:00
precompileIntl('locales'),
],
build: {
rollupOptions: {
external: ['/_app/COMPONENT_API.json'],
},
},
2022-05-20 19:53:13 -07:00
server: {
fs: {
2022-06-17 19:58:01 -07:00
allow: ['generated', 'docs'],
},
},
},
files: {
2022-06-17 19:58:01 -07:00
assets: 'docs/static',
hooks: 'docs/hooks',
lib: 'src',
params: 'docs/params',
routes: 'docs/routes',
serviceWorker: 'docs/service-worker',
template: 'docs/app.html',
},
},
}