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

[12.2.x] fix(@angular-devkit/build-angular): support WASM-based esbuild optimizer fallback #21789

Merged

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 22, 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.

12.2.x variant of #21763

@google-cla google-cla bot added the cla: yes label Sep 22, 2021
@clydin clydin added the target: patch This PR is targeted for the next patch release label Sep 22, 2021
@clydin clydin force-pushed the css-optimizer/esbuildd-wasm-fallback-12.2.x branch 2 times, most recently from c1dc633 to 80fb76a Compare September 22, 2021 14:18
…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/esbuildd-wasm-fallback-12.2.x branch from 80fb76a to c68750e Compare September 22, 2021 14:31
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Sep 22, 2021
@alan-agius4 alan-agius4 merged commit d856b4d into angular:12.2.x Sep 22, 2021
@clydin clydin deleted the css-optimizer/esbuildd-wasm-fallback-12.2.x branch September 22, 2021 15:51
@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: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants