Skip to content

Conversation

alan-agius4
Copy link
Collaborator

This commit introduces the keepNames option in esbuild configurations for both application code bundling and Vite utility functions.

By setting keepNames to true (or conditionally based on optimization settings), function and variable names are preserved during the build process. This significantly improves the debugging experience in development mode by ensuring that original names are retained in compiled output, leading to more readable stack traces and easier identification of code sections during development.

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Sep 5, 2025
@alan-agius4 alan-agius4 requested a review from clydin September 5, 2025 07:22
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer and removed detected: feature PR contains a feature commit labels Sep 5, 2025
@alan-agius4 alan-agius4 force-pushed the keep-names-devmode branch 3 times, most recently from a497dd2 to ac8662f Compare September 5, 2025 07:26
… in dev mode

This commit introduces the `keepNames` option in esbuild configurations for both application code bundling and Vite utility functions.

By setting `keepNames` to `true` (or conditionally based on optimization settings), function and variable names are preserved during the build process. This significantly improves the debugging experience in **development mode** by ensuring that original names are retained in compiled output, leading to more readable stack traces and easier identification of code sections during development.
@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 Sep 5, 2025
@clydin clydin changed the title feat(@angular/build): preserve names in esbuild for improved debugging in dev mode fix(@angular/build): preserve names in esbuild for improved debugging in dev mode Sep 5, 2025
@clydin clydin merged commit 58da860 into angular:main Sep 5, 2025
32 checks passed
@clydin
Copy link
Member

clydin commented Sep 5, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the keep-names-devmode branch September 5, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/build 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