From adf7d86dcd2ee098155449b00e2ea41a8a8b545f Mon Sep 17 00:00:00 2001 From: frostime Date: Fri, 19 Apr 2024 19:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20config=20svelte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svelte.config.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/svelte.config.js b/svelte.config.js index 7c8df62..d62a343 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -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" +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) => { + // suppress warnings on `vite dev` and `vite build`; but even without this, things still work + if (NoWarns.has(warning.code)) return; + handler(warning); + } }