near / react-on-chain

Improved execution layer for NEAR decentralized frontend components
https://roc-docs.near.dev/
23 stars 5 forks source link

Support package versioning within import subpaths #398

Open andy-haynes opened 1 month ago

andy-haynes commented 1 month ago

Currently @phosphor-icons/react/dist/icons/Horse resolves to version 2.1.4, which is broken. Referencing the subpath was necessary to avoid pulling in all icons, but now specifying the version must be supported in order to import the last known working version: @phosphor-icons/react@2.0.15.

However this code fetches all icons anyway:

import { Horse } from '@phosphor-icons/react@2.0.15/dist/icons/Horse';

The import path resolution should be fixed to support this, since https://esm.sh/@phosphor-icons/react@2.0.15/dist/icons/Horse does resolve to the correct package.