Skip to content

Commit 449c9d6

Browse files
committed
Fix a11y warnings in svelte UX components spamming server terminal (techniq/svelte-ux#186), format documents
1 parent bc8008c commit 449c9d6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

svelte.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ const config = {
77
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
88
// for more information about preprocessors
99
preprocess: [vitePreprocess()],
10-
1110
kit: {
1211
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1312
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
1413
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
1514
adapter: adapter()
15+
},
16+
onwarn(warning, defaultHandler) {
17+
// Do not show 3rd party warnings
18+
if (warning.filename.includes('node_modules')) return;
19+
defaultHandler(warning);
1620
}
1721
};
18-
export default config;
22+
export default config;

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import { defineConfig } from 'vite';
44

55
export default defineConfig({
66
plugins: [sveltekit(), purgeCss()]
7-
});
7+
});

0 commit comments

Comments
 (0)