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
feat: allow access to public env in app.html (#8449)
* allow access to public env in app.html
* Update .changeset/spotty-points-battle.md
Co-authored-by: Simon H <[email protected]>
* Update .changeset/spotty-points-battle.md
Co-authored-by: Simon H <[email protected]>
* updated to match recent changes
* don't silently fail when encountering private env vars
* replace vars at run time, not build time
* remove <p> as it was interfering with other tests
* reduce diff
* reduce diff
* tweak docs
Co-authored-by: Ben McCann <[email protected]>
Co-authored-by: Simon H <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
Copy file name to clipboardExpand all lines: documentation/docs/10-getting-started/30-project-structure.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ The `src` directory contains the meat of your project.
45
45
-`%sveltekit.body%` — the markup for a rendered page. This should live inside a `<div>` or other element, rather than directly inside `<body>`, to prevent bugs caused by browser extensions injecting elements that are then destroyed by the hydration process. SvelteKit will warn you in development if this is not the case
46
46
-`%sveltekit.assets%` — either [`paths.assets`](/docs/configuration#paths), if specified, or a relative path to [`paths.base`](/docs/configuration#paths)
47
47
-`%sveltekit.nonce%` — a [CSP](/docs/configuration#csp) nonce for manually included links and scripts, if used
48
+
-`%sveltekit.env.[NAME]%` - this will be replaced at render time with the `[NAME]` environment variable, which must begin with the [`publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (usually `PUBLIC_`). It will fallback to `''` if not matched.
48
49
-`error.html` (optional) is the page that is rendered when everything else fails. It can contain the following placeholders:
0 commit comments