We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
astro
2.5.0
n/a
npm/pnpm
macOS / Stackblitz
Firefox
Routes injected using the injectRoute integration API do not get scripts injected via the injectScript API added to them.
injectRoute
injectScript
I’ve tested injectScript('page', '...') and injectScript('page-ssr', '...') and both are not loaded on injected routes.
injectScript('page', '...')
injectScript('page-ssr', '...')
The reproduction shows the same route (src/route.astro) loaded at / (via src/pages/index.astro) and at /injected (via the injectRoute API).
src/route.astro
/
src/pages/index.astro
/injected
At /:
alert()
At /injected neither of these work.
Uncovered this here when someone tried adding the Tailwind integration to Starlight: withastro/starlight#88
https://stackblitz.com/edit/github-ssvscu?file=astro.config.mjs
The text was updated successfully, but these errors were encountered:
I found what is causing this issue. I'm working on a solution.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What version of
astro
are you using?2.5.0
Are you using an SSR adapter? If so, which one?
n/a
What package manager are you using?
npm/pnpm
What operating system are you using?
macOS / Stackblitz
What browser are you using?
Firefox
Describe the Bug
Routes injected using the
injectRoute
integration API do not get scripts injected via theinjectScript
API added to them.I’ve tested
injectScript('page', '...')
andinjectScript('page-ssr', '...')
and both are not loaded on injected routes.The reproduction shows the same route (
src/route.astro
) loaded at/
(viasrc/pages/index.astro
) and at/injected
(via theinjectRoute
API).At
/
:injectScript('page-ssr', '...')
to inject them)alert()
injected into the page also pops up.At
/injected
neither of these work.Uncovered this here when someone tried adding the Tailwind integration to Starlight: withastro/starlight#88
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ssvscu?file=astro.config.mjs
Participation
The text was updated successfully, but these errors were encountered: