[Feature Request]: Publish ESM on CDN
See original GitHub issuePreflight Checklist
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
What package is this feature request for?
rrweb
Problem Description
For pages that asynchronously install rrweb recorder, we currently use createElement('script')
and script.onload
to lazy import rrweb-record.min.js
, but it will be more confortable if we can simply use await import('rrweb-record.esm.js')
.
Proposed Solution
Build and publish bundled ESM modules alongside current dist
Alternatives Considered
Using createElement('script')
works but is a little complicated
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Introducing esm.run - A New-Age CDN for JavaScript modules
Updated as of Sep 2022: We are excited to announce a long-awaited feature - improved support for packages distributed as ES modules.
Read more >Dynamically Import ESM Modules From A CDN - ITNEXT
It tells the browser to load code on demand and only when it is required. const print = async (admin) => { if...
Read more >An ESM bundle for any NPM package | by Joel Denning
I decided to publish them under the @esm-bundle npm scope, so that they are available via yarn add thing@npm:@esm-bundle/thing and on CDNs at ......
Read more >Native ES Module CDN - Documentation - jspm.org
Native ES Module CDN. JSPM provides two primary modules CDNs - jspm.io , a highly optimized CDN for import maps from development to...
Read more >Packages from CDNs | Manual - Deno
Because it simply serves up the original published source code, it doesn't really help when ... esm.sh is a CDN that was specifically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to try to create a PR for this
I believe this PR might fix it: https://github.com/rrweb-io/rrweb/pull/1033 It’s not finished yet but includes esm in release