daybrush / infinite-viewer

Infinite Viewer is Document Viewer Component with infinite scrolling.
https://daybrush.com/infinite-viewer/
MIT License
296 stars 33 forks source link

chore: upgrade lit #66

Closed zsoerenm closed 11 months ago

zsoerenm commented 11 months ago

Lit v3 has been released. It is vastly compatibly with Lit v2. Some small changes were necessary (e.g. decorators should be imported from lit/decorators.js instead of lit-element).

Unfortunately, when I try to npm run build I run into the following error:

./src/index.ts → ./dist/infinite-viewer.umd.js...
(!) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../../node_modules/lit-element/lit-element.js: (6:195)
[!] Error: Unexpected token
../../node_modules/lit-element/lit-element.js (6:195)
4:  * Copyright 2017 Google LLC
5:  * SPDX-License-Identifier: BSD-3-Clause
6:  */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render(); // I shortened this
                                                                                                                                                                                                      ^
7: //# sourceMappingURL=lit-element.js.map
Error: Unexpected token
    at error (/home/schoenbrod/Code/infinite-viewer/node_modules/rollup/dist/shared/node-entry.js:5400:30)
    at Module.error (/home/schoenbrod/Code/infinite-viewer/node_modules/rollup/dist/shared/node-entry.js:9824:16)

It looks like ??= is an unexpected token. However, this token is valid since node v15. I'm running node v20.8.1

node -v
v20.8.1

Do you have any thoughts on this?

daybrush commented 11 months ago

@zsoerenm It will be released soon with bug fixes.

daybrush commented 11 months ago

@zsoerenm

infinite-viewer's new version is released.