web: remove built-in sveltekit announcer (for real this time)

This commit is contained in:
dumbmoron
2024-09-07 15:57:53 +00:00
parent 3fdfd44515
commit b4f17487b4
2 changed files with 11 additions and 6 deletions

View File

@@ -10,6 +10,17 @@ const config = {
// for more information about preprocessors
extensions: [".svelte", ".md"],
preprocess: [
{
name: "strip-announcer",
markup: ({ content: code }) => {
code = code.replace(
/<div id="svelte-announcer" [\s\S]*?<\/div>/,
'<svelte:component this={null} />'
);
return { code }
}
},
sveltePreprocess(),
mdsvex({
extensions: ['.md'],