We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d45113 commit bd20531Copy full SHA for bd20531
.changeset/chilled-rivers-learn.md
@@ -0,0 +1,5 @@
1
+---
2
+'@sveltejs/kit': patch
3
4
+
5
+fix: correct undefined reference to global var with Vitest
packages/kit/src/exports/vite/index.js
@@ -334,7 +334,7 @@ function kit({ svelte_config }) {
334
335
async load(id, options) {
336
const browser = !options?.ssr;
337
- const global = `__sveltekit_${version_hash}`;
+ const global = `globalThis.__sveltekit_${version_hash}`;
338
339
if (options?.ssr === false && process.env.TEST !== 'true') {
340
const normalized_cwd = vite.normalizePath(cwd);
0 commit comments