-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)
Description
Astro Info
Astro v4.15.6
Node v20.11.1
System Linux (x64)
Package Manager pnpm
Output hybrid
Adapter @astrojs/node
Integrations @astrojs/mdx
@astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Switched to Content Layer API, having content collections with mdx files that include and call various [astro] components in their content.
---
frontmatter...
---
import SomeComponent from "@components/some-component.astro";
Lorem ....
<SomeComponent/>[astro] components can have scripts and styles.
When browsing website, I see scripts basically from all components included and executed on every page, even if they are not part of given page content.
What's the expected result?
Only those assets should be part of the page that are included in content or template. This worked with Content Collections.
Link to Minimal Reproducible Example
Participation
- I am willing to submit a pull request for this issue.
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)