Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

hashdeps/esm.sh

Repository files navigation

esm.sh – fork

Go to the original repo for its docs – this README just explains the fork.

Where is it used?

We use esm.sh to load dependencies for blocks in the demo sandbox, e.g. the Code block.

The code that does this is here.

Why the fork?

esm.sh is a great project, but it has some stability issues. Updates occasionally break the packages we are using it to import, which means that the fail to load, breaking both user-facing pages and our CI (which test the block pages).

Deployment

The code in the repo is built to a Dockerfile and deployed to AWS's ECS.

This process is not automated, instead:

  1. Build the image
  2. Test the image locally (see below)
  3. Tag the image as latest for the relevant repository
  4. Push it to the repository
  5. Force a new deployment of the ECS service

To test the built Docker image before deploying:

  1. docker run -p 80:80 bp-esm (you can expose a different port but amend the command below)
  2. Visit localhost and check you see the homepage
  3. In the blockprotocol repo, set ESM_CDN_URL="http://localhost" in .env.local
  4. Run yarn dev in the blockprotocol repo to start the site
  5. Visit a block page and check it works, e.g. http://localhost:3000/@hash/blocks/code

TODO

If we want to stick with this approach and need to update this, we should probably:

  1. Move this config into the blockprotocol repo, e.g.
    • add the Dockerfile and the config.json there
    • have the Dockerfile checkout the esm.sh repo at a specific, known-working tag
  2. Automate deployment

About

A fast, global CDN for NPM packages with ESM format.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 50.5%
  • Rust 20.1%
  • TypeScript 14.6%
  • JavaScript 11.4%
  • CSS 1.6%
  • Shell 1.0%
  • Other 0.8%

AltStyle によって変換されたページ (->オリジナル) /