-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvelte.config.js
55 lines (53 loc) · 1.55 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import preprocess from 'svelte-preprocess';
import adapter from './adapter-custom-static.js';
import path from 'path';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
outDir: 'build',
sourceDir: 'src',
distDir: 'dist'
}),
paths: {
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
},
alias: {
'$src': path.resolve("./src"),
'$assets': path.resolve("./src/assets"),
'$base': path.resolve("./src/base"),
'$components': path.resolve('./src/components'),
'$componentTemplate': path.resolve('./src/lib/ComponentTemplate/ComponentTemplate.svelte'),
'$functions': path.resolve("./src/functions"),
'$images': path.resolve("./src/lib/images"),
'$layouts': path.resolve("./src/layouts"),
'$lib': path.resolve('./src/lib'),
'$props': path.resolve("./src/lib"),
'$routes': path.resolve('./src/routes'),
'$stores': path.resolve("./src/stores"),
'$styles': path.resolve("./src/styles"),
'$types': path.resolve("./src/types")
},
// prerender: {
// handleHttpError: ({ path, referrer, message }) => {
// // Ignore 404s during prerendering
// if (message.includes('404')) {
// return;
// }
// // Otherwise, throw the error
// throw new Error(message);
// }
// }
},
preprocess: [
preprocess({
scss: {
includePaths: [path.join(process.cwd(), 'src/styles')],
}
})
],
// compilerOptions: {
// runes: true
// }
};
export default config;