Commit 3771447
authored
package.json: list type exports for
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"
~~~~~~~~~~~~~~~~~~~
```import. (#3915)1 parent 8503c96 commit 3771447
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
0 commit comments