Skip to content
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

[WIP] switch from deno to esbuild #297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SimonDanisch
Copy link
Owner

@SimonDanisch SimonDanisch commented Feb 19, 2025

Motivation: deno has deprecated their bundler 🤷 We're currently pinning an old version which still has the bundler, but this will obviously lead to problems in the future.

First test looked like a simple switch and replace, but then i noticed that esbuild doesn't seem to support something like: import * as Pako from "https://cdn.esm.sh/v66/pako@2.0.4/es2021/pako.js"; in the source files, which deno downloaded and inlined into the bundle, which seems like the ideal behavior from my perspective.

We can either:

  • deprecate using CDNs in source files. It would be a bit sad to see this go, since it's a quite convenient way to use external dependencies without any hassle, and makes it easy to upgrade to newer versions.
  • find a solution with esbuild somehow (already googled/llm'ed it a bit without much success).
  • search and replace all urls and download them as part of the bundling. Advantage: we'll need to scan all imports, which would be a nice information for needs_bundling, since right now we can only check if the main js file has changed on disc. Disadvantage : quite a bit of work to make it work reliably.

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.

1 participant