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

fix(package.json): fix export map types #661

Merged
merged 3 commits into from
Jan 14, 2024

Conversation

tazyong
Copy link
Contributor

@tazyong tazyong commented Jun 28, 2023

Fix import error in typescript
image

Copy link

@bachirelkhoury bachirelkhoury left a comment

Choose a reason for hiding this comment

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

This resolved the typing error. Could someone please merge.

@trusktr
Copy link
Member

trusktr commented Jul 12, 2023

This will be handled soon as part of

Besides it won't make sense to point both ESM and CommonJS files to the same type definitions.

So in #655 we'll work on this next first thing, simplify the output, moving onto only ES Modules so we avoid the need to have a more complicated configuration.


In the meantime, anyone who wants to try @tazyong's branch can install Tween.js like this:

npm install @tweenjs/tween.js@git@github:tazyong/tween.js#package-health

or put this inside package.json:

"dependencies": {
  "@tweenjs/tween.js": "github:tazyong/tween.js#package-health"
}

package.json Outdated
@@ -8,8 +8,14 @@
"module": "dist/tween.esm.js",
"exports": {
".": {
"import": "./dist/tween.esm.js",
Copy link

Choose a reason for hiding this comment

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

could use more easy way by just one line inserted like this ?
image
it seems work for me!

@DJ-caddev
Copy link

Any update on this issue?

@MasatoMakino
Copy link
Contributor

Here is a minimal tsconfig.json to reproduce this problem.

{
  "compilerOptions": {
    "module": "ES2015",
    "noImplicitAny": true,
    "moduleResolution": "bundler" // or "node16"
  }
}

noImplicitAny is part of strict.

I hope this record helps someone.

@trusktr
Copy link
Member

trusktr commented Sep 25, 2023

Thanks @MasatoMakino. Will circle to this soon, this week.

@Methuselah96
Copy link

Hey @trusktr this is a pretty rough for TypeScript users, since TypeScript doesn't think there are any types for modern moduleResolution settings. I had to copy-and-paste the types into @types/three to work around this.

Looking forward to this getting resolved. :)

@trusktr
Copy link
Member

trusktr commented Jan 14, 2024

The types have been recently added from the other PR (the one-liner as @july-12 mentioned above)!

@trusktr trusktr merged commit 28aff25 into tweenjs:main Jan 14, 2024
@trusktr
Copy link
Member

trusktr commented Jan 14, 2024

Thank you for the contribution!

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.

8 participants