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(types): update import from three/examples #3095

Merged

Conversation

Methuselah96
Copy link
Contributor

@Methuselah96 Methuselah96 commented Nov 13, 2023

The current types import from three/examples/jsm/loaders/GLTFLoader which is not a valid import path based on three.js's package.json "exports" and therfore produces a type error when using "moduleResolution": "bundler":

Error: ./node_modules/@react-three/fiber/dist/declarations/src/core/hooks.d.ts(4,22): error TS2307: Cannot find module 'three/examples/jsm/loaders/GLTFLoader' or its corresponding type declarations.

Adding the .js extension allows TypeScript to resolve to the correct file.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit eb4344c:

Sandbox Source
example Configuration

@Methuselah96 Methuselah96 changed the title fix(types): update import from three examples fix(types): update import from three/examples Nov 13, 2023
@CodyJasonBennett CodyJasonBennett merged commit 02815d7 into pmndrs:master Nov 13, 2023
2 checks passed
@Methuselah96 Methuselah96 deleted the module-resolution-bundler branch November 13, 2023 23:30
renovate bot added a commit to simonknittel/sinister-incorporated that referenced this pull request Dec 20, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@react-three/fiber](https://github.com/pmndrs/react-three-fiber) |
[`8.15.10` ->
`8.15.12`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.15.10/8.15.12)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@react-three%2ffiber/8.15.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-three%2ffiber/8.15.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-three%2ffiber/8.15.10/8.15.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-three%2ffiber/8.15.10/8.15.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pmndrs/react-three-fiber (@&#8203;react-three/fiber)</summary>

###
[`v8.15.12`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.15.12)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.15.11...v8.15.12)

#### What's Changed

- fix(useLoader): loosen GLTF inference check by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[pmndrs/react-three-fiber#3105
- fix(types): preserve deprecated XR type annotations by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[pmndrs/react-three-fiber#3111

**Full Changelog**:
pmndrs/react-three-fiber@v8.15.11...v8.15.12

###
[`v8.15.11`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.15.11)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.15.10...v8.15.11)

#### What's Changed

- fix(types): update import from three/examples by
[@&#8203;Methuselah96](https://github.com/Methuselah96) in
[pmndrs/react-three-fiber#3095

#### New Contributors

- [@&#8203;warrenseine](https://github.com/warrenseine) made their
first contribution in
[pmndrs/react-three-fiber#3094

**Full Changelog**:
pmndrs/react-three-fiber@v8.15.10...v8.15.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/simonknittel/sinister-incorporated).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->
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.

2 participants