Commit 7659746
committed
package.json: list type exports.
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"
~~~~~~~~~~~~~~~~~~~
```1 parent 8503c96 commit 7659746
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
0 commit comments