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

build: disable inline sourcemap generation #26118

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

clydin
Copy link
Member

@clydin clydin commented Oct 24, 2023

The built packages that will be published on npm previously contained inlined sourcemaps for every JavaScript file. This caused a significant increase in the overall package size of over two times larger. This has a negative effect on developer experience especially the new project experience due to the increased time to download and setup a new project. The sourcemaps are also rarely used as debugging the CLI code itself is typically done with development builds. The generated code is also very close to the original source due to it being emitted as ES2022 code and with the eventual switch to ESM output this will become even closer.
As an example of the size difference, the @angular/cli compressed package size was reduced from ~352Kb to ~115Kb with this change.

The built packages that will be published on npm previously contained inlined
sourcemaps for every JavaScript file. This caused a significant increase in the
overall package size of over two times larger. This has a negative effect on
developer experience especially the new project experience due to the increase
time to download and setup a new project. The sourcemaps are also rarely used
as debugging the CLI code itself is typically done with development builds.
The generated code is also very close to the original source due to it being
emitted as ES2022 code and with the eventual switch to ESM output this will
become even closer.
As an example of the size difference, the `@angular/cli` compressed package size
was reduced from ~352Kb to ~115Kb with this change.
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Oct 24, 2023
@clydin clydin marked this pull request as ready for review October 24, 2023 16:12
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 24, 2023
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate 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 Oct 24, 2023
@alan-agius4 alan-agius4 merged commit f7130ef into angular:main Oct 25, 2023
38 checks passed
@clydin clydin deleted the build/no-inline-sourcemaps branch October 25, 2023 11:52
@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 Nov 25, 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 area: build & ci Related the build and CI infrastructure of the project target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants