Skip to content

Add a %svelte.version% template placeholder to propagate the current kit.version.name to app.html #12130

@potch

Description

@potch

Describe the problem

We use git SHA for our versions across our apps, and pass those versions to third-party analytics services like Datadog. Several of these providers can be largely configured as static <script> tags in our app.html, but we'd like to be able to include the current version as well.

Describe the proposed solution

We're passing the version string as recommended in the version docs and would like if that version string was available as an HTML placeholder, e.g. %svelte.version%.

Alternatives considered

We've looked at doing our own HTML templating as part of hooks.server, as well as duplicating the version string into PUBLIC_VERSION which we could then access via %svelte.env.PUBLIC_VERSION% but if it's reasonable/straightforward to propagate the version via template placeholders it would be great ergonomics

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionNot sure if we want to do this yet, also design work needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions