esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

esbuild target: User-Agent not working

Open bubbajoe opened this issue 1 year ago • 4 comments

Getting the target via the query params seems to work... curl https://esm.sh/[email protected]\?target\=es2015

however, using the user agent does not seem to work curl https://esm.sh/[email protected] -H User-Agent:esm/es2015

Additionally, on the esm.sh website, it mentions By default, esm.sh checks the User-Agent header to determine the build target.

but doesn't mention how it does that, it would be nice to mention how this works, I had to check the code and still didn't work.

bubbajoe avatar Jul 01 '24 15:07 bubbajoe

there are lot of changes i didn't deploy to the production yet, including support of User-Agent:esm/es20xx

ije avatar Jul 01 '24 15:07 ije

Sorry I am confused, why was the esm/es20xx change just removed?

image

bubbajoe avatar Jul 02 '24 03:07 bubbajoe

this is introduced in v136, currently production is v135

ije avatar Jul 02 '24 07:07 ije

Thanks, when is the next planned release?

bubbajoe avatar Jul 02 '24 09:07 bubbajoe