2024-06-16 14:21:26 +01:00
|
|
|
import adapter from '@sveltejs/adapter-static';
|
2024-06-29 18:58:00 +01:00
|
|
|
import { mdsvex } from 'mdsvex';
|
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import { dirname, join } from 'node:path';
|
2024-07-21 11:06:16 +01:00
|
|
|
import { sveltePreprocess } from 'svelte-preprocess';
|
2024-06-13 10:32:17 +01:00
|
|
|
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
|
|
const config = {
|
|
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
|
|
// for more information about preprocessors
|
2024-06-29 18:58:00 +01:00
|
|
|
extensions: [".svelte", ".md"],
|
|
|
|
preprocess: [
|
2024-09-07 16:57:53 +01:00
|
|
|
{
|
|
|
|
name: "strip-announcer",
|
|
|
|
markup: ({ content: code }) => {
|
|
|
|
code = code.replace(
|
|
|
|
/<div id="svelte-announcer" [\s\S]*?<\/div>/,
|
|
|
|
'<svelte:component this={null} />'
|
|
|
|
);
|
|
|
|
|
|
|
|
return { code }
|
|
|
|
}
|
|
|
|
},
|
2024-07-21 11:06:16 +01:00
|
|
|
sveltePreprocess(),
|
2024-06-29 18:58:00 +01:00
|
|
|
mdsvex({
|
|
|
|
extensions: ['.md'],
|
2024-09-17 19:54:28 +01:00
|
|
|
layout: {
|
|
|
|
about: join(
|
|
|
|
dirname(fileURLToPath(import.meta.url)),
|
|
|
|
'/src/components/misc/AboutPageWrapper.svelte'
|
|
|
|
),
|
|
|
|
changelogs: join(
|
|
|
|
dirname(fileURLToPath(import.meta.url)),
|
|
|
|
'/src/components/changelog/ChangelogEntryWrapper.svelte'
|
|
|
|
)
|
|
|
|
}
|
2024-06-29 18:58:00 +01:00
|
|
|
})
|
|
|
|
],
|
2024-06-13 10:32:17 +01:00
|
|
|
kit: {
|
2024-06-24 15:23:55 +01:00
|
|
|
adapter: adapter({
|
|
|
|
// default options are shown. On some platforms
|
|
|
|
// these options are set automatically — see below
|
|
|
|
pages: 'build',
|
|
|
|
assets: 'build',
|
2024-09-03 14:38:07 +01:00
|
|
|
fallback: '404.html',
|
2024-06-24 15:23:55 +01:00
|
|
|
precompress: false,
|
|
|
|
strict: true
|
|
|
|
}),
|
2024-09-09 16:11:08 +01:00
|
|
|
env: {
|
|
|
|
publicPrefix: 'WEB_'
|
|
|
|
},
|
2024-07-23 11:04:43 +01:00
|
|
|
version: {
|
|
|
|
pollInterval: 60000
|
|
|
|
},
|
2024-07-07 17:10:12 +01:00
|
|
|
paths: {
|
|
|
|
relative: false
|
|
|
|
},
|
2024-06-24 15:23:55 +01:00
|
|
|
alias: {
|
2024-07-02 19:16:03 +01:00
|
|
|
$components: 'src/components',
|
|
|
|
$i18n: 'i18n',
|
2024-06-24 15:23:55 +01:00
|
|
|
}
|
|
|
|
}
|
2024-06-13 10:32:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|