Skip to content

[labs/virtualizer] unable to import RangeChangedEvent and VisibilityChangedEvent from full module file specifier '@lit-labs/virtualizer/lit-virtualizer.js' #3341

@usergenic

Description

@usergenic

Which package(s) are affected?

Virtualizer (@lit-labs/virtualizer)

Description

It looks like we don't have ./Virtualizer.js in the exported modules which prevents importing the RangeChangedEvent and VisibilityChangedEvent from an explicit file specifier.

Would have expected that importing from @lit-labs/virtualizer/lit-virtualizer.js would have worked but apparently the transitive dependency is not automatically provided without the explicit module export in package.json for Virtualizer.js

Reproduction

import {RangeChangedEvent} from '@lit-labs/virtualizer/lit-virtualizer.js';`

Returns a Could not resolve import error.

Workaround

If you use just the package specifier @lit-labs/virtualizer that works. But that is not a work-around if your project requires full file specifier.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

0.7.2 and 0.0.0-masonry-preview-20220906220426

Browser/OS/Node environment

n/a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions