-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsvelte.config.js
89 lines (84 loc) · 1.71 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import sveltePreprocess from 'svelte-preprocess';
import autoprefixer from 'autoprefixer';
import node from '@sveltejs/adapter-node';
import netlify from '@sveltejs/adapter-netlify';
import cvWorker from '@sveltejs/adapter-cloudflare-workers';
import adapterStatic from '@sveltejs/adapter-static';
const dev = process.env.NODE_ENV === 'development';
/**
* @type {import("./src/lib/types/index").KitConfig}
*/
const kitConfig = {
// target: '#svelte',
files: {
// serviceWorker: '..',
// template: 'index.html',
},
serviceWorker: {
register: false,
files: filepath => !/\.DS_STORE/.test(filepath),
},
adapter: node(),
// adapter: adapterStatic(),
// adapter: netlify(),
// adapter: cvWorker({
// esbuild(defaultOptions) {
// return {
// ...defaultOptions,
// target: 'es2015',
// plugins: [],
// };
// },
// }),
// router: false,
paths: {
// assets: 'https://cdn.la-mediterranee.at',
},
prerender: {
enabled: true,
crawl: true,
onError: 'continue',
entries: ['*'],
},
};
const preprocess = sveltePreprocess({
// babel: {
// presets: [
// [
// '@babel/preset-env',
// {
// loose: true,
// modules: false,
// targets: {
// // ! Very important. Target es6+
// esmodules: true
// }
// }
// ]
// ]
// },
typescript: {
tsconfigFile: './tsconfig.json',
},
scss: {
includePaths: ['src/styles', 'theme', 'node_modules'],
},
postcss: {
plugins: [
autoprefixer({
env: 'development',
}),
],
},
sourceMap: dev,
preserve: ['ld+json', 'application/ld+json'],
});
/** @type {import('@sveltejs/kit').Config} */
const config = {
compilerOptions: {
dev,
},
preprocess: preprocess,
kit: kitConfig,
};
export default config;