Skip to content

Allows a package to be used in a project with --moduleResolution bundler #34

Closed
@Misinin

Description

@Misinin

tsconfig.json my project

{
  "compilerOptions": {
    ...
    "module": "ESNext",
    "moduleResolution": "Bundler",
    ...
    }
}
Screenshot 2024-07-08 at 17 27 10

I solved this problem by adding a line in package.json "atomic-router-react" package a line with the path to the types

{
  "name": "atomic-router-react",
  ...
  "types": "dist/atomic-router.d.ts",
  "exports": {
    ".": {
      ...
      "types": "./dist/atomic-router.d.ts"
    },
    ...
}

Is this the right decision or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions