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

fix(@angular-devkit/build-angular): support WASM-based esbuild optimizer fallback #21763

Merged

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 16, 2021

In the event that the Angular CLI is executed on a platform that does not yet have native support for esbuild, the WASM-based variant of esbuild will now be used. If the first attempt to optimize a file fails to execute the native variant of esbuild, future executions will instead use the WASM-based variant instead which will execute regardless of the native platform. The WASM-based variant, unfortunately, can be significantly slower than the native version (some cases can be several times slower). For install time concerns regarding the esbuild post-install step, esbuild is now listed as an optional dependency which will allow the post-install step to fail but allow the full npm install to pass. This install scenario should only occur in the event that the esbuild native binary cannot be installed or is otherwise unavailable.

@google-cla google-cla bot added the cla: yes label Sep 16, 2021
@clydin clydin force-pushed the css-optimizer/esbuild-wasm-fallback branch 5 times, most recently from 12596cc to 01f3afb Compare September 21, 2021 19:35
@clydin clydin marked this pull request as ready for review September 21, 2021 19:36
@clydin clydin requested a review from alan-agius4 September 21, 2021 19:36
@clydin clydin added the target: major This PR is targeted for the next major release label Sep 21, 2021
@clydin clydin force-pushed the css-optimizer/esbuild-wasm-fallback branch 2 times, most recently from 429a703 to 625717f Compare September 21, 2021 20:30
@alan-agius4 alan-agius4 linked an issue Sep 22, 2021 that may be closed by this pull request
15 tasks
@alan-agius4 alan-agius4 added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Sep 22, 2021
…zer fallback

In the event that the Angular CLI is executed on a platform that does not yet have native support for esbuild, the WASM-based variant of esbuild will now be used. If the first attempt to optimize a file fails to execute the native variant of esbuild, future executions will instead use the WASM-based variant instead which will execute regardless of the native platform. The WASM-based variant, unfortunately, can be significantly slower than the native version (some cases can be several times slower). For install time concerns regarding the esbuild post-install step, esbuild is now listed as an optional dependency which will allow the post-install step to fail but allow the full npm install to pass. This install scenario should only occur in the event that the esbuild native binary cannot be installed or is otherwise unavailable.
@clydin clydin force-pushed the css-optimizer/esbuild-wasm-fallback branch from 625717f to f7566d4 Compare September 22, 2021 13:29
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Sep 22, 2021
@alan-agius4 alan-agius4 merged commit 0d76bf0 into angular:master Sep 22, 2021
@clydin clydin deleted the css-optimizer/esbuild-wasm-fallback branch September 22, 2021 14:10
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blocked esbuild.exe executable breaks Angular projects
2 participants