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

Explore a new Packager: ESBuild #717

Closed
wants to merge 10 commits into from

Conversation

NullVoxPopuli
Copy link
Collaborator

This is super WIP, and I don't have planned dedicated time to work on this, so.. we'll see how long this takes :D

ESBuild is still considered experimental (esp their plugin system), but I want to start a couple things with this PR:

  • track what remaining work needs to happen for ESBuild to be supported
  • Demonstrate how a packager can be implemented that isn't webpack
  • Potentially further extract shared utilities between multiple packagers

@ef4
Copy link
Contributor

ef4 commented Mar 11, 2021

This is good to work on.

My starting suggestion is to configure an ember app like this:

  process.env.STAGE2_ONLY = 'true';
  return compatBuild(app, null, {
    staticAddonTrees: true,
    staticAddonTestSupportTrees: true,
    staticComponents: true,
    staticHelpers: true,
    workspaceDir: '../out-ember-app',
  });

and run ember s. Then you can work inside ../out-ember-app which will be very close to consumable by esbuild. The main thing you'll need to adapt is that it will contain _babel_config_.js which you will need to translate into the esbuild equivalents, and _template_compiler_.js which you will need to install to handle .hbs files.

@ef4
Copy link
Contributor

ef4 commented Mar 11, 2021

I've just been going through this same exercise for snowpack and vite.

You will most likely want the work on this branch which I haven't had a chance to bring back into master yet.

@NullVoxPopuli NullVoxPopuli changed the base branch from master to importSync-eager-mode March 13, 2021 02:47
@NullVoxPopuli NullVoxPopuli changed the base branch from importSync-eager-mode to master March 13, 2021 02:48
@NullVoxPopuli
Copy link
Collaborator Author

Gonna close this, because PR #759 from @alexlafroscia looks amazing! (and way more complete).
Also, Vite is on top of ESBuild! https://vitejs.dev/config/#esbuild (I had no idea!)

<3

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.

None yet

2 participants