Skip to content

feat(@angular-devkit/build-angular): add initial experimental esbuild-based application browser builder #22995

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

Merged
merged 2 commits into from
Apr 23, 2022

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 15, 2022

An experimental browser application builder (browser-esbuild) has been introduced that leverages esbuild as the bundler.
This new builder is compatible with options of the current browser application builder (browser) and can be enabled
for experimentation purposes by replacing the builder field of @angular-devkit/build-angular:browser from an existing
project to @angular-devkit/build-angular:browser-esbuild. The builder will generate an ESM-based application and provides support for ES2015+ compatible output with ES2020 as the default.

This builder is considered experimental and is not recommended for production applications.

Currently not all browser builder options and capabilities are supported with this experimental builder. Additional support for these options may be added in the future.
The following options and capabilities are not currently supported:

  • Stylesheet Preprocessors (only CSS styles are supported)
  • Angular JIT mode (only AOT is supported)
  • Localization [localize]
  • Watch and dev-server modes [watch, poll, etc.]
  • File replacements [fileReplacements]
  • License text extraction [extractLicenses]
  • Bundle budgets [budgets]
  • Global scripts [scripts]
  • Build stats JSON output [statsJson]
  • Deploy URL [deployURL]
  • CommonJS module warnings (no warnings will be generated for CommonJS package usage)
  • Web Workers
  • Service workers [serviceWorker, ngswConfigPath]

@clydin clydin force-pushed the esbuild/initial-builder branch 2 times, most recently from c18a2ca to 2f9522d Compare April 15, 2022 12:48
@clydin clydin added the target: major This PR is targeted for the next major release label Apr 15, 2022
@clydin clydin marked this pull request as ready for review April 15, 2022 13:21
@clydin clydin force-pushed the esbuild/initial-builder branch from 2f9522d to 2f61c76 Compare April 15, 2022 13:40
@clydin clydin force-pushed the esbuild/initial-builder branch 5 times, most recently from 9bb0f20 to 1cd3c66 Compare April 20, 2022 19:33
Copy link
Collaborator

@dgp1130 dgp1130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff! It actually comes together looking pretty simple in the end. I mostly have a bunch of nitpicks and questions, but overall it looks great!

@clydin clydin force-pushed the esbuild/initial-builder branch 2 times, most recently from 783f249 to 1ae9dec Compare April 21, 2022 19:20
@clydin clydin force-pushed the esbuild/initial-builder branch from 1ae9dec to 3423807 Compare April 22, 2022 21:38
@clydin clydin requested a review from dgp1130 April 22, 2022 21:43
Copy link
Collaborator

@dgp1130 dgp1130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I think some comments are still open but I don't have any major concerns with this.

clydin added 2 commits April 22, 2022 20:08
…-based application browser builder

An experimental browser application builder (`browser-esbuild`) has been introduced that leverages esbuild as the bundler.
This new builder is compatible with options of the current browser application builder (`browser`) and can be enabled
for experimentation purposes by replacing the `builder` field of `@angular-devkit/build-angular:browser` from an existing
project to `@angular-devkit/build-angular:browser-esbuild`. The builder will generate an ESM-based application and
provides support for ES2015+ compatible output with ES2020 as the default.

This builder is considered experimental and is not recommended for production applications.

Currently not all `browser` builder options and capabilities are supported with this experimental builder.
Additional support for these options may be added in the future.
The following options and capabilities are not currently supported:
* Stylesheet Preprocessors (only CSS styles are supported)
* Angular JIT mode (only AOT is supported)
* Localization [`localize`]
* Watch and dev-server modes [`watch`, `poll`, etc.]
* File replacements [`fileReplacements`]
* License text extraction [`extractLicenses`]
* Bundle budgets [`budgets`]
* Global scripts [`scripts`]
* Build stats JSON output [`statsJson`]
* Deploy URL [`deployURL`]
* CommonJS module warnings (no warnings will be generated for CommonJS package usage)
* Web Workers
* Service workers [`serviceWorker`, `ngswConfigPath`]
The basic suite of E2E tests are now run against the newly introduced experimental esbuild-based builder (`browser-esbuild`).
Several tests are currently ignored based on the current feature set of the builder.
@clydin clydin force-pushed the esbuild/initial-builder branch from 3423807 to c1b1c49 Compare April 23, 2022 00:08
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Apr 23, 2022
@clydin clydin merged commit ef23b39 into angular:master Apr 23, 2022
@clydin clydin deleted the esbuild/initial-builder branch April 23, 2022 00:46
@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 May 24, 2022
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.

3 participants