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
Astro v4.15.12
Node v18.20.2
System macOS (arm64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations routing
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Description: In a project using two injected routes with the same entrypoint, the client-side script is missing from one route after building the project, preventing dynamic behavior (e.g., a clock) from working.
Steps to Reproduce:
Define two injected routes in astro.config.mjs with the same entrypoint:
All routes using the same entrypoint should include the necessary client-side scripts and behave consistently in both development and production builds.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Description: In a project using two injected routes with the same entrypoint, the client-side script is missing from one route after building the project, preventing dynamic behavior (e.g., a clock) from working.
Steps to Reproduce:
astro.config.mjs
with the sameentrypoint
:npm run dev
.npm run build && npm run server
.Expected Behavior:
Both
/hello
and/blog/welcome
should display a dynamic clock.Actual Behavior:
/hello
displays the clock as expected./blog/welcome
does not display the clock. The necessary<script>
is missing from the page's source.Workaround:
Removing the
/hello
injected route fixes the issue, and the clock works as expected on/blog/
URLs after the build.Relevant Sources:
view-source:http://localhost:4321/hello
view-source:http://localhost:4321/blog/welcome
What's the expected result?
All routes using the same entrypoint should include the necessary client-side scripts and behave consistently in both development and production builds.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-csdu7e?file=README.md
Participation
The text was updated successfully, but these errors were encountered: