Skip to content

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

Open

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

Activity

  1. self-assigned this
    on Oct 27, 2022
  2. moved this to 📋 Triaged in Lit Project Boardon Oct 27, 2022
  3. moved this from 📋 Triaged to ✅ Done in Lit Project Boardon Nov 4, 2022
  4. usergenic commented on Dec 6, 2022

    @usergenic
    ContributorAuthor

    #3430 fixes this issue and will be available in forthcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions