Skip to content

Commit

Permalink
Stop Svelte warning about self-closing HTML tags
Browse files Browse the repository at this point in the history
We'll fix the self-closing tags when we migrate to Svelte 5; in the
meantime, we don't want these warnings to flood the compilation results
and end up hiding other, more important, warnings.
  • Loading branch information
rmunn committed Nov 26, 2024
1 parent 8c936f8 commit 6e77555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
compilerOptions: {
warningFilter: (warning) => warning.code != 'element_invalid_self_closing_tag',
enableSourcemap: true
},
kit: {
Expand Down
1 change: 1 addition & 0 deletions frontend/viewer/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const postcssConfig = path.join(__dirname, 'postcss.config.cjs');

export default {
compilerOptions: {
warningFilter: (warning) => warning.code != 'element_invalid_self_closing_tag',
customElement: true,
},
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
Expand Down

0 comments on commit 6e77555

Please sign in to comment.