Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented May 31, 2023

The Angular compiler generates two types of metadata calls when it generates AOT code. This metadata is not used in fully AOT compiled applications and can contain direct references to components, services, etc. that may affect the output chunk layout of the application. While this currently has not lead to any problems, it could in the future and the Webpack bundler already performs a transform that preemptively removes these calls. To remain consistent, the esbuild-based build system will now also perform this transform.

This also updates the autoprefixer behavior tests to check the actual runtime style text instead of the style text within the metadata calls.

…in esbuild builder

The Angular compiler generates two types of metadata calls when it generates AOT code.
This metadata is not used in fully AOT compiled applications and can contain direct references
to components, services, etc. that may affect the output chunk layout of the application.
While this currently has not lead to any problems, it could in the future and the Webpack
bundler already performs a transform that preemptively removes these calls. To remain
consistent, the esbuild-based build system will now also perform this transform.

This also updates the autoprefixer behavior tests to check the actual runtime style text
instead of the style text within the metadata calls.

(cherry picked from commit c462d9c)
@clydin clydin added the target: patch This PR is targeted for the next patch release label May 31, 2023
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label May 31, 2023
@clydin clydin merged commit cd02475 into angular:16.0.x May 31, 2023
@clydin clydin deleted the esbuild/ng-metadata-16.0.x branch May 31, 2023 14:21
@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 Jul 1, 2023
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.

2 participants