Skip to content

new repl infra (enabling importing from CDN (no v1 addons)) #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 115 commits into
base: main
Choose a base branch
from

Conversation

NullVoxPopuli
Copy link
Owner

@NullVoxPopuli NullVoxPopuli commented May 5, 2025

Todo:

  • get tests passing
    • fix svelte compiler
    • ensure all previous markdown features have a path forward
  • add svelte, vue, and react to the compiler ui
  • check if we still need the iframe for rendering, or if we can get rid of it, since it's all nested applications
  • docs?

Blocked on:

Closes: #32, #1756, #1632, #1717, #477, #1805, #1717

Prior Service Worker Attempts:

Note

It may still be worth pursuing service workers as an option -- especially for https://limber.glimdown.com, as the idea of avoiding blocking the main thread when compiling is very attractive.

The approach in this PR will have more main-thread work, but will be simpler for the embedded use cases, as folks are (rightfully so!) to install third-party service workers on their sites.

Prior non-Service Worker Attempts

  • Allow importing anything (except v1 addons) #1805 - abandoned because I don't have enough control over the imports -- there are situations, especially from CDNs where chained imports do not go through the polyfill
    • this issue is still present, but I think if I can can use tarballs instead, and preprocess all the files myself, maybe I can handle @embroider/macros

Help / Ideas

Features

  • supports svelte, mermaid, react, solid, vue, (and could be expanded to anything else)
  • allows importing from NPM (any package)
    • of course, v1 addons are not allowed, as v1 addons are an old ember concept where the npm libraries are actually node programs that the app would call out to asking for browser code to concat to its bundles
  • markdown can render any component from any framework using its codefences and the meta live
    e.g.:
    hello!
    ```gjs live
    ember contents here
    ```
    
    ```svelte live
    svelte contents here
    ```

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented May 6, 2025

Project Preview URL1 Manage
Limber https://repl-sdk-v2.limber-glimdown.pages.dev on Cloudflare
Tutorial https://repl-sdk-v2.limber-glimmer-tutorial.pages.dev on Cloudflare

Logs

Footnotes

  1. if these branch preview links are not working, please check the logs for the commit-based preview link. There is a character limit of 28 for the branch subdomain, as well as some other heuristics, described here for the sake of implementation ease in deploy-preview.yml, that algo has been omitted. The URLs are logged in the wrangler output, but it's hard to get outputs from a matrix job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow importing from arbitrary npm packages for better demos
1 participant