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

Consider Esbuild Integration #77

Closed
tooolbox opened this issue Jun 15, 2021 · 2 comments
Closed

Consider Esbuild Integration #77

tooolbox opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
feature request Enhancement or feature request

Comments

@tooolbox
Copy link
Collaborator

Esbuild is a pure-Go JS bundler with syntax lowering features.

  1. One of the features of Algernon is JSX transformation, using goja-babel. Replacing this with Esbuild could see dramatic performance improvements.
  2. By integrating Esbuild into Algernon, it could do on-the-fly (or cached) processing, including bundling, typescript stripping, the aforementioned JSX transforms, and lowering to ES6.

I could see general integration being achieved in a few ways:

  • Exposing the Esbuild API to Lua so you can call it from handler code.
  • Perhaps, in the matter of .lua or .tmpl, a .esbuild file extension which signals Algernon to use it as an entry point.
  • A local config.esbuild file which tells Algernon how to configure Esbuild for a particular directory.
@xyproto
Copy link
Owner

xyproto commented Jun 23, 2021

I support this idea!

@xyproto xyproto added the feature request Enhancement or feature request label Jun 23, 2021
@xyproto
Copy link
Owner

xyproto commented Mar 25, 2022

I created a jsx branch that switches from goja-babel to esbuild. It feels really fast, after running a few simple tests.

https://github.com/xyproto/algernon/tree/jsx

@xyproto xyproto self-assigned this Mar 25, 2022
xyproto added a commit that referenced this issue Mar 25, 2022
* Update dependencies
* Switch from jvatic/goja-babel to wvanw/esbuild
@xyproto xyproto closed this as completed Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants