Skip to content

Add the types condition to the package.json#exports #4334

@jsjames

Description

@jsjames

This addresses 2 issues:

  • Implements the correct export for typescript 4.7+.
    This is required for TypeScript to work with packages that have exports when using the new moduleResolution: node16/nodenext/bundler settings. When those are not used then TypeScript just ignores package.json#exports - but when you make it aware of exports by using those options then it requires the types to be included in exports and not as the top-level key of package.json

  • adds the missing registerComponents function type definition.

Today I used patch-package to patch framework7-vue@7.1.5 for the project I'm working on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions