Skip to content

Commit a8b7ea7

Browse files
authored
Add upgrade guidance on standalone lit-html usage (#514)
Fixes #2185
1 parent 5ff4d2d commit a8b7ea7

File tree

1 file changed

+13
-0
lines changed
  • packages/lit-dev-content/site/docs/releases

1 file changed

+13
-0
lines changed

packages/lit-dev-content/site/docs/releases/upgrade.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ To:
6868
import {repeat} from 'lit/directives/repeat.js';
6969
```
7070

71+
### Update standalone lit-html imports
72+
73+
If using lit-html standalone (outside of LitElement), you can import standalone-specific API's like `render` from the `lit/html.js` entrypoint:
74+
75+
From:
76+
```js
77+
import {render, html} from 'lit-html';
78+
```
79+
To:
80+
```js
81+
import {render, html} from 'lit/html.js';
82+
```
83+
7184
## Load `polyfill-support` when using web components polyfills
7285

7386
Lit 2.0 still supports the same browsers down to IE11. However, given the broad adoption of Web Components APIs in modern browsers, we have taken the opportunity to move all of the code required for interfacing with the web components polyfills out of the core libraries and into an opt-in support file, so that the tax for supporting older browsers is only paid when required.

0 commit comments

Comments
 (0)