-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP [Content Collections] Fix script bleed in prod builds #6047
Conversation
🦋 Changeset detectedLatest commit: 0d57caf The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
// TODO: map raw URL (?type=script) to client build ready URL | ||
// This will inject the raw URL as a script tag as-is, | ||
// which will fail to map with the client build output. | ||
pageData.propagatedScripts = propagatedMapByImporter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the part left to figure out. Today, this naively passes the unformatted URL as a client build entrypoint. This gets mangled by Vite in the output (script.astro?type=script
-> script.astro.fancytype.2j234k2.js
).
* fix: add error handling for invalid arguments * chore: add changeset * Update packages/astro/src/core/errors/errors-data.ts Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> --------- Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Currently, @astrojs/image allows *importing* images from srcDir only. Importing images from outside srcDir fails miserably *in dev mode* and produces incorrect src. This happens because `path.relative(fileURLToPath(config.srcDir), id)` resolves to "../something" and when joined with '/@astroimage' cancels it out (`join('/@astroimage', '../../something')` => `'/something'`). Rework /@astroimage URL scheme to be similar to "/@fs/" scheme—always export absolute path to the target file.
* show `cause` in error overlay * add extra check for string * add changeset
* fix: load MDX syntax highlighting after user plugins * chore: changeset
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: BryceRussell <19967622+BryceRussell@users.noreply.github.com>
…of type 'String' in Edge Runtime SSR (#6070) * minor fixes for errors related to vercel SSR in core * yielding empty string instead of nothing, to not exit the iterator --------- Co-authored-by: AirBorne04 <>
* fix: apply MDX components during render() * test: MDX components export in SSG and SSR * chore: changeset
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
* Forwards compatiblity for streaming DSD * add shadowrootmode * update tests * add changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…cs as cloudflare) (#6085) * fix solidjs integration for vercel deployment * downgrade change to patch --------- Co-authored-by: AirBorne04 <>
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Yasser Hennawi <yasser.hennawi@nordsec.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Node adapter: handle prerendering and serving with query params * Adding a changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Refactor build into plugins * maybe fix internals * Await post-build hooks * Use extendManualChunks * Remove commented out code
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Closing in favor of #6119 |
Changes
propagatedScripts
map to page build data. This will track scripts that can be injected via head propagationTesting
Docs
N/A