Skip to content

Comments

Fix warning when importing phoenix_live_view#3926

Merged
SteffenDE merged 1 commit intophoenixframework:mainfrom
navinpeiris:main
Aug 1, 2025
Merged

Fix warning when importing phoenix_live_view#3926
SteffenDE merged 1 commit intophoenixframework:mainfrom
navinpeiris:main

Conversation

@navinpeiris
Copy link
Contributor

This fixes the following warning that is encountered when trying to import phoenix_live_view:

▲ [WARNING] The condition "types" here will never be used as it comes after "default" [package.json]

    ../deps/phoenix_live_view/package.json:14:6:
      14 │       "types": "./assets/js/types/index.d.ts"
         ╵       ~~~~~~~

  The "default" condition comes earlier and will always be chosen:

    ../deps/phoenix_live_view/package.json:13:6:
      13 │       "default": "./priv/static/phoenix_live_view.esm.js",
         ╵       ~~~~~~~~~

Fixes #3925

This fixes the following warning that is encountered when trying to
import `phoenix_live_view`:

```
▲ [WARNING] The condition "types" here will never be used as it comes after "default" [package.json]

    ../deps/phoenix_live_view/package.json:14:6:
      14 │       "types": "./assets/js/types/index.d.ts"
         ╵       ~~~~~~~

  The "default" condition comes earlier and will always be chosen:

    ../deps/phoenix_live_view/package.json:13:6:
      13 │       "default": "./priv/static/phoenix_live_view.esm.js",
         ╵       ~~~~~~~~~
```
@kivikakk
Copy link
Contributor

kivikakk commented Aug 1, 2025

Thanks for this! (I introduced the original change in #3915.) I would never have suspected these were ordered, and figured it made sense for default to be listed first. TIL!

@SteffenDE SteffenDE merged commit e0d1fcd into phoenixframework:main Aug 1, 2025
@SteffenDE
Copy link
Collaborator

🙌🏻

SteffenDE pushed a commit that referenced this pull request Aug 5, 2025
This fixes the following warning that is encountered when trying to
import `phoenix_live_view`:

```
▲ [WARNING] The condition "types" here will never be used as it comes after "default" [package.json]

    ../deps/phoenix_live_view/package.json:14:6:
      14 │       "types": "./assets/js/types/index.d.ts"
         ╵       ~~~~~~~

  The "default" condition comes earlier and will always be chosen:

    ../deps/phoenix_live_view/package.json:13:6:
      13 │       "default": "./priv/static/phoenix_live_view.esm.js",
         ╵       ~~~~~~~~~
```
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.

Typing warning emitted in 1.1.2 when importing phoenix_live_view in app.ts

3 participants