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.4.6
Node v18.18.0
System macOS (arm64)
Package Manager pnpm
Output server
Adapter @astrojs/node
Integrations @astrojs/tailwind
@astrojs/svelte
@sentry/astro
astrojs-service-worker
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The code inside <script> tags is always executed. This mean, they are executed in the client, but also in the server.
While I understand this is something useful in case the server dom needs to be modified, it will be nice to have a way to be able to opt-out for some script tags.
Components do not exhibit the same behavior, where you can decide if they run on the client or the server and the client.
What's the expected result?
I want to be able to exclude some script tags to run while SSR without having to check for the SSR env variable.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The code inside
<script>
tags is always executed. This mean, they are executed in the client, but also in the server.While I understand this is something useful in case the server dom needs to be modified, it will be nice to have a way to be able to opt-out for some script tags.
Components do not exhibit the same behavior, where you can decide if they run on the client or the server and the client.
What's the expected result?
I want to be able to exclude some script tags to run while SSR without having to check for the SSR env variable.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-a7qbew?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: