-
Notifications
You must be signed in to change notification settings - Fork 1
/
svelte.config.js
35 lines (31 loc) · 926 Bytes
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import autoAdapter from '@sveltejs/adapter-auto';
import staticAdapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
import { mdsvex } from 'mdsvex';
const dev = process.env.NODE_ENV === 'development';
const publishing = process.env.STERLING_SVELTE_PUBLISH === 'true';
const pathsBase = publishing ? '/demos/sterling-svelte' : '';
const routes = publishing ? 'src/routes/(app)' : 'src/routes';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [
preprocess(),
mdsvex({
extensions: ['.md']
})
],
extensions: ['.svelte', '.md'],
kit: {
adapter: publishing ? staticAdapter() : autoAdapter(),
paths: {
base: pathsBase,
relative: !publishing
},
files: {
routes
}
}
};
export default config;