Bug: Sprite.Provider/Spritesheet breaks pages where sprites are not used
btk5h opened this issue · comments
Bryan Terce commented
Sprite.Provider
breaks pages that do not use any sprites.
Steps to reproduce
Create an astro page with a Sprite.Provider
but with no Sprite
components as children
Observed behavior
The page fails to build with a misleading "<SpriteSheet> should be the very last child of the page's <body>!" error
Desired behavior
The page builds and renders properly
Workaround
Don't render the Sprite.Provider
on pages (which may be difficult if placed in a layout component), or add a hidden sprite to each page
Nate Moore commented
Ah this is a good point, I think I can remove this behavior now. This was mostly to catch issues when migrating.
Nate Moore commented
Fixed this in 3b29d89 and released in astro-icon@0.7.0
!