Discuss: CDN builds should include ESM ready modules
See original GitHub issueWe already have a ton of infrastructure, history, documentation around making our web builds available via CDN (and secondarily) via NPM via
con-assets
… if we do have an ESM library that is intended for use on the web then it should be built withcdn
and packaged along with the CJS version in our CDN distribution. It would be very strange for it to not be included there. That may require some additional work/thought… so if you want to have that discussion…
_Originally posted by @joshgoebel in https://github.com/highlightjs/highlight.js/pull/3188#issuecomment-844207270_
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Pika Project Launches New JavaScript CDN to Serve Modern ...
Pika Project Launches New JavaScript CDN to Serve Modern, ESM Packages ... the results will only include those that have a defined “module” ......
Read more >Pure ESM package - gists · GitHub
CDN's that allow packages to be imported via URL for browsers or Deno have to do more fiddly work to convert all the...
Read more >ArcGIS API for JavaScript – Learn About ES Modules - Esri
This post discusses some of the differences between AMD and ESM, there's a hands-on tutorial to help you build your first app, then...
Read more >Module Federation - webpack
Each build acts as a container and also consumes other builds as containers. This way, each build is able to access any other...
Read more >Import non-ESM libraries in ES Modules, with client-side ...
Once you start using ESM, you realize that most libraries out there are not written in ESM, nor do they include ESM builds....
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 Free
Top 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
@aduh95 If you’re interesting I think this is quite likely as simple and taking the ESM build code I removed from
node
build before and migrating it over to thecdn
build…This bundle already exists (CDN build):
es/core.js
This currently does not exist. This would require several complexities be resolved before it could exist in core:
highlight*
and perhapsregisterLanguage
/getLanguage
http -> html -> (css/js)
), including circular dependencies(html => js => html)
I’m probably forgetting things, you’d have to skim several of these threads - I’ve definitely written on this subject before.
Also, see #2405. Right now I’m unconvinced that this isn’t better handled by a wrapper outside of core such as say a new
highlightjs-async
library that simply wrapped the core library with async niceness. (you’d have to handle aliases and the dependency graph, plus a nice async wrapper)