Skip to content

Conversation

@Timeless0911
Copy link
Contributor

Summary

closes: #567

Fix cannot import typing issue when "moduleResolution": "NodeNext" in user's tsconfig.json by adding an empty package.json to the dist-types folder.

Related Links

web-infra-dev/rsbuild#2353

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package.json should be updated too

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 17, 2024

CodSpeed Performance Report

Merging #568 will not alter performance

Comparing fix/types (1c9d239) with main (0f71812)

Summary

✅ 5 untouched benchmarks

@Timeless0911
Copy link
Contributor Author

package.json should be updated too

  "exports": {
    ".": {
      "types": "./dist-types/index.d.ts",
      "default": "./dist/index.js"
    },
    "./package.json": "./package.json"
  },
  "main": "./dist/index.js",
  "types": "./dist-types/index.d.ts",

Already correct I think.

@chenjiahan chenjiahan merged commit 3d5312d into main Dec 17, 2024
19 checks passed
@chenjiahan chenjiahan deleted the fix/types branch December 17, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot import typings from @rslib/core

3 participants