package.json: list type exports. - #3915
Merged
Merged
Conversation
SteffenDE
reviewed
Jul 31, 2025
Without something like this, we get the following when using
moduleResolution "bundler":
```
js/app.ts:3:34 - error TS7016: Could not find a declaration file for module 'phoenix_live_view'.
'[...]/node_modules/phoenix_live_view/priv/static/phoenix_live_view.esm.js' implicitly has an 'any' type.
There are types at '[...]/node_modules/phoenix_live_view/assets/js/types/index.d.ts', but this result
could not be resolved when respecting package.json "exports". The 'phoenix_live_view' library may need
to update its package.json or typings.
3 import { Hook, LiveSocket } from "phoenix_live_view"
~~~~~~~~~~~~~~~~~~~
```
kivikakk
force-pushed
the
push-uzywtputqrly
branch
from
July 31, 2025 10:30
7659746 to
ca0892d
Compare
Member
|
🙌🏻 |
Contributor
Author
|
Thank you! 🤍 |
SteffenDE
pushed a commit
that referenced
this pull request
Jul 31, 2025
Without something like this, we get the following when using
moduleResolution "bundler":
```
js/app.ts:3:34 - error TS7016: Could not find a declaration file for module 'phoenix_live_view'.
'[...]/node_modules/phoenix_live_view/priv/static/phoenix_live_view.esm.js' implicitly has an 'any' type.
There are types at '[...]/node_modules/phoenix_live_view/assets/js/types/index.d.ts', but this result
could not be resolved when respecting package.json "exports". The 'phoenix_live_view' library may need
to update its package.json or typings.
3 import { Hook, LiveSocket } from "phoenix_live_view"
~~~~~~~~~~~~~~~~~~~
```
Member
|
Released in 1.1.2! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without something like this, we get the following when using moduleResolution "bundler":
I'm not confident this is the correct solution for all cases, but I do confirm it means my types resolve correctly!