You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm really hoping to turf NPM and build system complexity often required for consuming third-party libraries (especially in the front-end). esm.sh really helps with that.
My use case: I'm really interested in the idea of using Deno + esm.sh as a build system for front-end projects.
I'm using an importMap to resolve named dependencies - a feature which I think has a non-zero chance of becoming a future ecmascript standard. It isn't strictly necessary but many existing files use this style so it's useful to try and support it.
This works fine with Deno. The only problem is that esm.sh detects the Deno UA and (appropriately) I end up building a version for the Deno runtime - not the browser. No problem, I just need to specify ?target=esnext. The only problem now is that in so doing (or adding any query string parameters), imported paths are no longer constructed correctly. @mui/material/Button becomes https://esm.sh/@mui/material@5.3.0/?target=esnextButton
My suggestion would be to simply add support for a ?path query string parameter (or ?subpath?) which would be appended (if specified) to the url path to determine the path of the requested resource.
Hi! Love the project!
I'm really hoping to turf NPM and build system complexity often required for consuming third-party libraries (especially in the front-end). esm.sh really helps with that.
My use case: I'm really interested in the idea of using Deno + esm.sh as a build system for front-end projects.
I'm using an importMap to resolve named dependencies - a feature which I think has a non-zero chance of becoming a future ecmascript standard. It isn't strictly necessary but many existing files use this style so it's useful to try and support it.
With imports.json
This works fine with Deno. The only problem is that esm.sh detects the Deno UA and (appropriately) I end up building a version for the Deno runtime - not the browser. No problem, I just need to specify
?target=esnext
. The only problem now is that in so doing (or adding any query string parameters), imported paths are no longer constructed correctly.@mui/material/Button
becomeshttps://esm.sh/@mui/material@5.3.0/?target=esnextButton
My suggestion would be to simply add support for a
?path
query string parameter (or?subpath
?) which would be appended (if specified) to the url path to determine the path of the requested resource.So
https://esm.sh/@mui/material@5.3.0?target=esnext&path=/Button
would be equivalent to
https://esm.sh/@mui/material@5.3.0/Button?target=esnext
The text was updated successfully, but these errors were encountered: