esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
3.14k stars 151 forks source link

preact/hooks not respecting external? #871

Open dreiss opened 2 months ago

dreiss commented 2 months ago

Failing module

Loading from the url https://esm.sh/*preact/hooks with curl, I get redirected to https://esm.sh/*preact@10.23.2/hooks, which looks like

/* esm.sh - preact@10.23.2/hooks */
import "/stable/preact@10.23.2/esnext/preact.mjs";
export * from "/stable/preact@10.23.2/esnext/hooks.js";

and https://esm.sh/stable/preact@10.23.2/esnext/hooks.js starts with import{options as V}from"/stable/preact@10.23.2/esnext/preact.mjs";

My understanding from the esm.sh docs was that the "*" at the start of the package name was supposed to make all references external so they would be resolved by import maps.

ije commented 2 months ago

i think this is a bug of the build resolver, i will look into it