Share your repls and programming experiences

← Back to all posts
📦Bundle Repl: Use Node.js repls in your html 📦
amasad (1423)

Writing a Node.js library on Repl.it is so fun and easy but it's hard to use it anywhere else. Well, now you can! (Very early alpha release)

Bundle Repl will take a Node repl and turn it into a bundle you can use in an HTML repl or project.

Send an HTTP GET request to https://bundle-repl.amasad.repl.co/bundle/@${username}/${repl} where username is your Repl.it username and repl is your repl. You'll get back a JavaScript bundle.

Let's see an example:

GreatLibrary is a great library that adds and subtract numbers. It's perfectly modular too. We want to build a simple calculator on top of it, so we start an html repl and include the following:

<script src="https://bundle-repl.amasad.repl.co/bundle/@amasad/GreatLibrary"></script>

And that's it! See it in action.

Commentshotnewtop
Kognise (227)

Awesome! Have you implemented caching yet?

amasad (1423)

@Kognise yes it's super fast now. It caches on GCS

PDanielY (132)

I don't really get it.

PDanielY (132)

@amasad the thing that is vague to me is what are bundle repls?