🔧 config svelte
This commit is contained in:
parent
4286a49a0b
commit
adf7d86dcd
1 changed files with 19 additions and 0 deletions
|
@ -1,7 +1,26 @@
|
||||||
|
/*
|
||||||
|
* 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"
|
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 {
|
export default {
|
||||||
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
|
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: vitePreprocess(),
|
preprocess: vitePreprocess(),
|
||||||
|
onwarn: (warning, handler) => {
|
||||||
|
// suppress warnings on `vite dev` and `vite build`; but even without this, things still work
|
||||||
|
if (NoWarns.has(warning.code)) return;
|
||||||
|
handler(warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue