Provide way to opt out of attributes on SSR'd <head>
elements used for hydration
#4258
Labels
awaiting submitter
needs a reproduction, or clarification
Is your feature request related to a problem? Please describe.
#4082 was a good solution for fixing
<head>
hydration, but unfortunately it adds unneeded attributes if one is using Svelte solely as a static site templating engine.Describe the solution you'd like
I'm not sure. Maybe we only add the attributes if the user has specified
generate: 'ssr'
andhydratable: true
? (Would this be considered a breaking change? Maybe technically?) As far as I know,hydratable: true
has no effect currently when compiling in SSR mode. To make Sapper also take advantage of this would involving updating the template so that the SSR compilation is also called withhydratable: true
.Describe alternatives you've considered
Doing nothing and living with these would certainly work. Some sort of post-processing of the generated HTML would also work, but would be hacky.
How important is this feature to you?
Eh, it would be nice. I would imagine that purely static HTML generation (with no hydration) represents a small fraction of Svelte's usage.
Additional context
Not much. My personal websites, which use Svelte as a static site generator, now have unnecessary attributes on their head elements.
The text was updated successfully, but these errors were encountered: