-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsvelte.config.js
More file actions
30 lines (25 loc) · 815 Bytes
/
svelte.config.js
File metadata and controls
30 lines (25 loc) · 815 Bytes
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
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import adapter from '@sveltejs/adapter-static';
// FYI
// console.log(123, process.env.NODE_ENV);
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
paths: {
// this did not work on github, internal routes returned 404
// base: process.env.NODE_ENV === 'production' ? '/givememydata' : ''
base: process.argv.includes('dev') ? '' : '/givememydata'
},
adapter: adapter({
pages: 'build',
assets: 'build',
// this did not work on github, internal routes returned 404
// fallback: null,
fallback: '404.html', // to specify a fallback page for SPA mode
precompress: false,
strict: true
})
},
preprocess: [vitePreprocess({})]
};
export default config;