Skip to content

Commit

Permalink
Update .changeset/loud-radios-change.md
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Marks <aomarks@google.com>
  • Loading branch information
steveworkman and aomarks committed Dec 5, 2022
1 parent 8bb62f3 commit d409602
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .changeset/loud-radios-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
'@lit-labs/ssr': major
---

dom shim does not expose the window object
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`.

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 comments on commit d409602

Please sign in to comment.