Skip to content

Commit d409602

Browse files
Update .changeset/loud-radios-change.md
Co-authored-by: Alexander Marks <[email protected]>
1 parent 8bb62f3 commit d409602

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.changeset/loud-radios-change.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
'@lit-labs/ssr': major
33
---
44

5-
dom shim does not expose the window object
5+
The Lit SSR DOM shim no longer defines a global `window` variable. This was removed to improve compatibility with libraries that detect whether they are running in Node vs the browser by checking for the presence of `window`.
6+
7+
If you have code that runs during SSR which depends on the presence of `window`, you can either replace `window` with `globalThis`, or use `isSsr` to avoid running that code on the server (see https://lit.dev/docs/ssr/authoring/#browser-only-code).

0 commit comments

Comments
 (0)