Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deps argument is not used by some subdependencies #994

Open
oscarotero opened this issue Jan 8, 2025 · 0 comments
Open

Deps argument is not used by some subdependencies #994

oscarotero opened this issue Jan 8, 2025 · 0 comments

Comments

@oscarotero
Copy link

oscarotero commented Jan 8, 2025

I have the following script, with React 19 as dependency:
https://esm.sh/@radix-ui/[email protected]

/* esm.sh - @radix-ui/[email protected] */
import "/stable/[email protected]/es2022/react.mjs";
import "/v135/@radix-ui/[email protected]/es2022/react-compose-refs.mjs";
import "/stable/[email protected]/es2022/jsx-runtime.js";
export * from "/v135/@radix-ui/[email protected]/es2022/react-slot.mjs";

I can configure it to use React 18 using the deps variable:
https://esm.sh/@radix-ui/[email protected][email protected]

/* esm.sh - @radix-ui/[email protected] */
import "/stable/[email protected]/es2022/react.mjs";
import "/v135/@radix-ui/[email protected]/es2022/react-compose-refs.mjs";
import "/stable/[email protected]/es2022/jsx-runtime.js";
export * from "/v135/@radix-ui/[email protected]/X-ZC9yZWFjdEAxOC4zLjE/es2022/react-slot.mjs";

But after opening the second import (/v135/@radix-ui/[email protected]/es2022/react-compose-refs.mjs) I can see it uses React 19

/* esm.sh - esbuild bundle(@radix-ui/[email protected]) es2022 production */
import*as f from"/stable/[email protected]/es2022/react.mjs";function l(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function i(...n){return o=>{let u=!1,c=n.map(t=>{let e=l(t,o);return!u&&typeof e=="function"&&(u=!0),e});if(u)return()=>{for(let t=0;t<c.length;t++){let e=c[t];typeof e=="function"?e():l(n[t],null)}}}}function s(...n){return f.useCallback(i(...n),n)}export{i as composeRefs,s as useComposedRefs};
//# sourceMappingURL=react-compose-refs.mjs.map

Interestingly the latest export (/v135/@radix-ui/[email protected]/es2022/react-slot.mjs) does keep my configuration and with [email protected] the path is different. (/v135/@radix-ui/[email protected]/X-ZC9yZWFjdEAxOC4zLjE/es2022/react-slot.mjs) and it does import React 18 correctly.

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

No branches or pull requests

1 participant