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): restore esm2022 bundle and drop fesm2022 in ng-packagr-lite executor #29615

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Jan 14, 2025

Current Behavior

In Nx 20.2.0, the ng-packagr-lite executor stopped producing the ESM2022 outputs and started producing the FESM2022 outputs. This was due to the Angular Package Format (APF) dropping the ESM2022 outputs, which was reflected in the upstream ng-packagr implementation. Due to this change, the libraries' build time and memory increased compared to the previous versions.

Expected Behavior

The ng-packagr-lite executor should only produce ESM2022 outputs and avoid running an extra step to bundle the outputs to produce the FESM2022.

Given the ng-packagr-lite executor is not meant to produce publishable artifacts, its output doesn't need to strictly comply with the APF and can focus more on build performance.

Related Issue(s)

Fixes #29519

@leosvelperez leosvelperez self-assigned this Jan 14, 2025
Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 14, 2025 5:37pm

Copy link

nx-cloud bot commented Jan 14, 2025

View your CI Pipeline Execution ↗ for commit ee72bfe.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 4m 49s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 14s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx format:check --base=c2fa9... ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation --no-dte ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-15 09:06:08 UTC

@leosvelperez leosvelperez force-pushed the angular/ng-packagr-esm2022 branch from a0f6438 to dc95a51 Compare January 14, 2025 16:56
@leosvelperez leosvelperez marked this pull request as ready for review January 14, 2025 16:57
@leosvelperez leosvelperez requested a review from a team as a code owner January 14, 2025 16:57
@leosvelperez leosvelperez requested a review from Coly010 January 14, 2025 16:57
@leosvelperez leosvelperez force-pushed the angular/ng-packagr-esm2022 branch from dc95a51 to ee72bfe Compare January 14, 2025 17:35
@leosvelperez leosvelperez enabled auto-merge (squash) January 14, 2025 17:36
@leosvelperez leosvelperez merged commit f24a869 into master Jan 15, 2025
6 checks passed
@leosvelperez leosvelperez deleted the angular/ng-packagr-esm2022 branch January 15, 2025 09:04
FrozenPandaz pushed a commit that referenced this pull request Jan 15, 2025
…lite executor (#29615)

## Current Behavior

In Nx 20.2.0, the `ng-packagr-lite` executor stopped producing the
ESM2022 outputs and started producing the FESM2022 outputs. This was due
to the Angular Package Format (APF) dropping the ESM2022 outputs, which
was reflected in the upstream `ng-packagr` implementation. Due to this
change, the libraries' build time and memory increased compared to the
previous versions.

## Expected Behavior

The `ng-packagr-lite` executor should only produce ESM2022 outputs and
avoid running an extra step to bundle the outputs to produce the
FESM2022.

Given the `ng-packagr-lite` executor is not meant to produce publishable
artifacts, its output doesn't need to strictly comply with the APF and
can focus more on build performance.

## Related Issue(s)

Fixes #29519

(cherry picked from commit f24a869)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@nx/angular:ng-packagr-lite uses much more memory since adding support for angular 19 in version 20.2.0
2 participants