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
❯ npm install && npm run dev
warn preInstall No description field
warn preInstall No repository field
warn preInstall No license field
┌ [1/4] 🔍 Resolving dependencies
└ Completed in 0.064s
┌ [2/4] 🚚 Fetching dependencies
│ info pruneDeps Excluding 13 dependencies. For more information use `--verbose`.
└ Completed in 0.948s
┌ [3/4] 🔗 Linking dependencies
└ Completed in 0.186s
info security We found `install` scripts which turbo skips for security reasons. For more information see
https://turbo.sh/install-scripts.
├─ @sveltejs/[email protected]
└─ [email protected]
info Some packages were automatically replaced with polyfills. For more information see
https://turbo.sh/polyfills.
└─ [email protected] =>[email protected]
success Saved lockfile "package-lock.json"
success Updated "package.json"
success Install finished in 1.23s
$ vite dev
VITE v3.0.7 ready in 1600 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
location is not defined
ReferenceError: location is not defined
at /src/lib/foo.js:2:10
at instantiateModule (file:///home/projects/kkviylzwo.github/node_modules/vite/dist/node/chunks/dep-0f13c890.js:50549:15)
Describe the bug
Importing code into a Svelte file that contains client-side only variables like
location
will cause vite errors in dev and build.Reproduction
Uses:
@sveltejs/adapter-static
and SSR: falsehttps://stackblitz.com/github/rob-balfre/sveltekit-static-bug?file=src%2Froutes%2F%2Bpage.svelte
Running dev will show
location is not defined
.Only errors if
location
is called via an import.Logs
System Info
Severity
blocking an upgrade
Additional Information
Worked fine prior to 1.0.0-next.405.
The text was updated successfully, but these errors were encountered: