You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, partials should not be used if the component contains scoped styles or scripts, as these elements will be stripped from the HTML output. If you need scoped styles, it is better to use regular, non-partial pages along with a frontend library that knows how to merge the contents into the head.
It can be difficult to know if a component in your component hierarchy is using scoped styles or Astro component scripts. Currently, if you are using a component in a partial that has scripts, it will be stripped silently.
What's the expected result?
It would be nice if astro could print a warning during dev and during build, if a partial is trying to use a component that has an astro component script or a scoped style.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The documentation clearly states:
It can be difficult to know if a component in your component hierarchy is using scoped styles or Astro component scripts. Currently, if you are using a component in a partial that has scripts, it will be stripped silently.
What's the expected result?
It would be nice if astro could print a warning during dev and during build, if a partial is trying to use a component that has an astro component script or a scoped style.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-rma1f4
Participation
The text was updated successfully, but these errors were encountered: