-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
30 lines (28 loc) · 973 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
/*
* Copyright (c) 2024 by frostime. All Rights Reserved.
* @Author : frostime
* @Date : 2023-05-19 19:49:13
* @FilePath : /svelte.config.js
* @LastEditTime : 2024-04-19 19:01:55
* @Description :
*/
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"
const NoWarns = new Set([
"a11y-click-events-have-key-events",
"a11y-no-static-element-interactions",
"a11y-no-noninteractive-element-interactions"
]);
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: vitePreprocess(),
onwarn: (warning, handler) => {
if (warning.code.startsWith('A11y:')) {
return;
}
if (warning.code.startsWith('a11y-')) return
// suppress warnings on `vite dev` and `vite build`; but even without this, things still work
if (NoWarns.has(warning.code)) return;
handler(warning);
}
}