Skip to content

Conversation

@Roman3349
Copy link

Fixes declaration file resolution with "Bundler" moduleResolution specified in tsconfig.json.

Motivation and Context

Fixes: stoplightio/json-schema-viewer#267.

Description

Fixes property ordering in exports property in package.json (see https://nodejs.org/api/packages.html#conditional-exports) - types should be first, import the second and require last. And also fixes invalid path (located in src/) for typing property.

How Has This Been Tested?

It was tested by building this package and testing it on https://github.com/stoplightio/json-schema-viewer/ which is currently affected.

Types of changes

See Description.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

@smoores-dev
Copy link

Would be great to see this merged — I'm still seeing this issue with @stoplight/[email protected]!

@johnboy-leeds
Copy link

I am also unable to use library this in a typescript project as this error cause a build failure. Does anyone have a workaround in the meantime? is there an older version that didn't have this issue?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could not find a declaration file for module '@stoplight/json-schema-viewer' with moduleResolution "Bundler"

3 participants