cobalt/web/svelte.config.js
dumbmoron b7e5a94226
Some checks are pending
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run tests / test service functionality (push) Waiting to run
Run tests / test service: ${{ matrix.service }} (push) Blocked by required conditions
web/svelte: enable fallback page generation
2024-09-03 13:39:21 +00:00

46 lines
1.3 KiB
JavaScript

import adapter from '@sveltejs/adapter-static';
import { mdsvex } from 'mdsvex';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
import { sveltePreprocess } from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
extensions: [".svelte", ".md"],
preprocess: [
sveltePreprocess(),
mdsvex({
extensions: ['.md'],
layout: join(
dirname(fileURLToPath(import.meta.url)),
'/src/components/changelog/ChangelogEntryWrapper.svelte'
)
})
],
kit: {
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: 'build',
assets: 'build',
fallback: '404.html',
precompress: false,
strict: true
}),
version: {
pollInterval: 60000
},
paths: {
relative: false
},
alias: {
$components: 'src/components',
$i18n: 'i18n',
}
}
};
export default config;