Skip to content

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Mar 13, 2023

Configure Babel to use setPublicClassFields: true. As when shipping Angular packages without "useDefineForClassFields": false will increase the bundle size of an ng-new app by ~2Kb when useDefineForClassFields is not false. due to the additional _defineProperty, which will be added on every class property.

See: https://babeljs.io/docs/babel-plugin-proposal-class-properties

@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Mar 13, 2023
@alan-agius4 alan-agius4 force-pushed the babel-public-fields branch from 6e051c9 to 9d88740 Compare March 13, 2023 16:30
…ties

Configure Babel to use `setPublicClassFields: true`. As when shipping Angular packages without `"useDefineForClassFields": false` will increase the bundle size of an ng-new app
by ~2Kb when `useDefineForClassFields`  is not false. due to the additional `_defineProperty`, which will be added on every class property.

See: https://babeljs.io/docs/babel-plugin-proposal-class-properties
@alan-agius4 alan-agius4 force-pushed the babel-public-fields branch from 9d88740 to bee2dde Compare March 13, 2023 16:43
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 13, 2023
@alan-agius4 alan-agius4 requested a review from clydin March 13, 2023 16:43
@alan-agius4 alan-agius4 marked this pull request as ready for review March 13, 2023 16:43
… properties

Co-authored-by: Charles <19598772+clydin@users.noreply.github.com>
@alan-agius4 alan-agius4 requested a review from clydin March 13, 2023 19:58
@alan-agius4 alan-agius4 added area: docs Related to the documentation merge: squash commits When the PR is merged, a squash and merge should be performed labels Mar 13, 2023
@clydin clydin removed the area: docs Related to the documentation label Mar 13, 2023
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 13, 2023
@angular-robot angular-robot bot merged commit 04274af into angular:main Mar 14, 2023
@alan-agius4 alan-agius4 deleted the babel-public-fields branch March 14, 2023 07:38
@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 Apr 14, 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 merge: squash commits When the PR is merged, a squash and merge should be performed target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants