Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/the-dijkstra/react-esm-sh
Experimenting with the new esm.sh/run
https://github.com/the-dijkstra/react-esm-sh
Last synced: 2 months ago
JSON representation
Experimenting with the new esm.sh/run
- Host: GitHub
- URL: https://github.com/the-dijkstra/react-esm-sh
- Owner: the-dijkstra
- Created: 2023-11-25T10:36:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-25T10:54:14.000Z (about 1 year ago)
- Last Synced: 2024-10-15T01:10:37.395Z (3 months ago)
- Language: HTML
- Homepage: https://react-esm-sh.vercel.app
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Islands With no Build Step
This example uses esm.sh/run, a 1KB script allows you to write jsx/tsx in HTML without build! [esm.sh/run](https://github.com/esm-dev/esm.sh/releases/tag/v135)
## How it Works?
After the page loaded, the 1KB tiny script computes the hash of the source of non-javascript elements, then checks the compiled JS exists in the cache, otherwise sends the source code to esm.sh build API and stores it in the cache system.
The cache system includes two iters of storage, are the localStoarge and the Cloudflare Edge network, to make the compiled JS load fast!![image](https://github.com/the-dijkstra/react-esm-sh/assets/9967336/fa963a17-717b-4e70-8637-6a2a27849215)
## Limitations
There are some limitations you need to be aware of:- Don't use external imports
- Needs internet connection out of local cache
- Rebuild happens when the HTML changed