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

POC build using esbuild #424

Open
maier49 opened this issue Aug 14, 2020 · 1 comment
Open

POC build using esbuild #424

maier49 opened this issue Aug 14, 2020 · 1 comment
Assignees

Comments

@maier49
Copy link
Contributor

maier49 commented Aug 14, 2020

Investigate if it's possible to build a Dojo project with esbuild

@maier49 maier49 self-assigned this Aug 14, 2020
@maier49
Copy link
Contributor Author

maier49 commented Aug 20, 2020

Testing out some different avenues for leveraging esbuild so far has promising results.

Using a simple rollup build with esbuild builds a functioning Dojo app within 3 seconds. The one issue remaining here is it's re-processing the css modules in node_modules and I think we might need to write our own plugins to resolve that simillarly to with the existing dojo build. The main concern here is obviously that this is an extremely simple build and after building out the full set of functionality currently provided by cli-build-app the performance differences might evaporate.

Simply using the esbuild loader instead of the ts loader also reduced builld times by about 20% no a basic Dojo app, from 11 seconds to 9 seconds. This branch of that same example repo is using a version of cli-build-app that includes the changes here.

The only thing we'd need to worry about here as far as I can tell is the transforms. We could easily switch to the ts loader for The registry transform since it's triggered by an explicit configuration. For the import transform we may need to wait to see if esbuild gets plugin support that would allow us to do something analagous. Or potentially we use esbuild only for dev builds and ts loader for production.

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

No branches or pull requests

1 participant