Skip to content

There are types at node_modules/framework7/framework7.d.ts but this cannot be resolved when respecting package.json "exports" #4181

@arnu515

Description

@arnu515
  • Framework7 version: 8.0.5
  • Platform and Target: React with Capacitor

Describe the bug

Framework7 (core module) typings do not work when used in a typescript file. They do however work when used in javascript.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new vite project using npm init vite. Select React with Typescript.
  2. Install framework7 and framework7-react with NPM
  3. Import framework7/lite in src/main.tsx. The error should be visible. The framework7 library will not be typed
  4. Rename src/main.tsx to src/main.jsx. The error is now gone, and the library is properly typed.

Expected behavior

The library should be typed and the error should not be there

Actual Behavior

There is an error while importing the types.

Screenshots

The error in typescript file:
image

Renaming to js file fixes the issue:
image

Additional context

None

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