Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing types to package.json for "." case #23

Open
awhitford opened this issue Jan 21, 2025 · 3 comments
Open

Add missing types to package.json for "." case #23

awhitford opened this issue Jan 21, 2025 · 3 comments

Comments

@awhitford
Copy link

Related to issue #20 and #22, it appears that there is a missing types entry in the package.json for the "." case:

  "types": "./dist/index/index.d.ts",
  "exports": {
    ".": {
      "solid": "./dist/index/index.jsx",
      "import": "./dist/index/index.module.js",
      "browser": "./dist/index/index.module.js",
      "require": "./dist/index/index.common.js",
      "node": "./dist/index/index.common.js",
      "types": "./dist/index/index.d.ts"
    },

The last types is presently missing.
If I manually add that, then my ts(7016) issue goes away.

@awhitford
Copy link
Author

awhitford commented Jan 21, 2025

Gee, that's weird... It looks like it was part of PR #21:

Image

So what happened to it?

It looks like the last revision removed it:

Image

I know it looks redundant, but it seems necessary.

If I rollback to 1.3.17, then my ts(7016) issue goes away too.

@davedbase
Copy link
Owner

I truly despise JavaScript packaging. lol.

I've made an adjustment to the exports and added the types in the wildcard export. I published as @beta tag. Can you test it before I officially publish it? Thanks :)

@davedbase
Copy link
Owner

@awhitford can you confirm? I can publish the beta if it seems better.

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

No branches or pull requests

2 participants