Releases: esm-dev/esm.sh
Releases Β· esm-dev/esm.sh
v105
v104
v103
- Add
inject
argument for worker factory, this is useful if you want toimportScripts
in the worker, but the module worker doesn't allow you to do it.import workerFactory from "https://esm.sh/[email protected]?worker"; const workerInject = ` self.onmessage = (e) => { // variable 'E' is the xxhash-wasm module default export E().then(hasher => { self.postMessage(hasher.h64ToString(e.data)); }) } `; const worker = workerFactory(workerInject); worker.onmessage = (e) => { console.log(e.data); // 502b0c5fc4a5704c }; worker.postMessage("Hello");
- Respect
?external
arg in bundle mode (close #498) - Add
require()
syntax support for dts transformer - Fix import maps scope is not correct by the CLI script (close #480)
- Fix
basePath
doesn't take effect on redirects (close #481) - Fix
X-TypeScript-Types
header not pined for stable builds - Fix some bugs related to package path parsing (#487)
- Upgrade
esbuild
to 0.16.17 - Upgrade
deno/std
to 0.173.0
Credits
Huge thanks to @goloveychuk @ahuigo @hjaurum @kidonng
v102
-
Support
browser
field of package.json to improve compatibility with npm packages in browser. For example, thewebtorrent
package will usememory-chunk-store
instead offs-chunk-store
and exclude built-in modules likefs
,net
,os
and so on.{ "name": "webtorrent", "description": "Streaming torrent client", "version": "1.9.6", "browser": { "./lib/server.js": false, "./lib/conn-pool.js": false, "./lib/utp.js": false, "bittorrent-dht/client": false, "fs": false, "fs-chunk-store": "memory-chunk-store", "load-ip-set": false, "net": false, "os": false, "ut_pex": false }, }
(Close #450)
v101
v100
πππ We just updated the esm.sh website with brand-new design for the v100 release, please take a look!
https://esm.sh
And we also added a playground app that allows you to play ESM in browser without build tools.
https://playground.esm.sh
Other Changes:
- Improve self-hosting configuration. check HOSTING.md for more details.
- Support
browser
field when it's an es6 module (close #381). - Purge headers from unpkg.com to avoid repeated
Access-Control-Allow-Origin
header (close #453). - Fix content compression (close #460).
- Fix alias export (close #471).
- Fix cycle importing (close #464).
- Fix scenarios where module/es2015 are shims (maps).
- Fix worker cors issue.
- Upgrade
esbuild
to 0.16.10. - Upgrade
deno/std
to 0.170.0.
Credits
Huge thanks to @hjaurum @chrisirhc @ThaUnknown @rxliuli
v99
v98
- Add tree-shaking support for es modules
import { __await, __rest } from "https://esm.sh/tslib" // 7.3KB import { __await, __rest } from "https://esm.sh/tslib?exports=__await,__rest" // 489B
- Add
node-fetch
polyfill for browsers and deno - Fix
exports
resolver (close #422) - Restart
ns
process when got "unreachable" error (close #448) - cjs-lexer: Update
swc
to latest
v97
- Add
https://esm.sh/build-target
endpoint to return the compatibletarget
of current browser/runtime by checkingUser-Agent
header, lowest ises2015
. - Add
--npm-token
option for the server to support private packages (#435). - Update
polyfills/node_process
: replace timeout withqueueMicrotask
(#444). - Upgrade
deno/std
to 0.162.0.
Credits
Huge thanks to @Justinidlerz @ThaUnknown