-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
46 lines (35 loc) · 1.26 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
import sveltePreprocess from 'svelte-preprocess';
// import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
export default {
// svelte options
extensions: ['.svelte'],
compilerOptions: {},
// @see https://kit.svelte.dev/docs/integrations
// This is faster but has no support for :global{ //selectors }
// This alos has no support for template tags wrapping HTML code in svelte files
// This also has no need for npm install -D sass
// preprocess: [vitePreprocess()],
// must have npm install -D sass
preprocess: [sveltePreprocess()],
onwarn(warning, defaultHandler) {
if (
warning.code === 'a11y-distracting-elements' ||
warning.code === 'anchor-is-valid' ||
warning.code === 'a11y-invalid-attribute' ||
warning.code === 'a11y-media-has-caption' ||
warning.code === 'a11y-missing-attribute' ||
warning.code === 'a11y-missing-content' ||
warning.code === 'a11y-no-static-element-interactions' ||
(warning. code === 'missing-declaration' && warning.frame.includes( 'route' ) )
) return;
// handle all other warnings normally
defaultHandler(warning);
},
// plugin options
vitePlugin: {
inspector: true,
exclude: [],
// experimental options
experimental: {}
}
};