René's URL Explorer Experiment


Title: ng serve with esbuild/Vite ignores sourceMap configuration, injecting large inline source maps into all files · Issue #31331 · angular/angular-cli · GitHub

Open Graph Title: ng serve with esbuild/Vite ignores sourceMap configuration, injecting large inline source maps into all files · Issue #31331 · angular/angular-cli

X Title: ng serve with esbuild/Vite ignores sourceMap configuration, injecting large inline source maps into all files · Issue #31331 · angular/angular-cli

Description: Command serve Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The development server (ng serve), which uses Vite/esbuild, co...

Open Graph Description: Command serve Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The development server...

X Description: Command serve Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The development server...

Opengraph URL: https://github.com/angular/angular-cli/issues/31331

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng serve with esbuild/Vite ignores sourceMap configuration, injecting large inline source maps into all files","articleBody":"### Command\n\nserve\n\n### Is this a regression?\n\n- [ ] Yes, this behavior used to work in the previous version\n\n### The previous version in which this bug was not present was\n\n_No response_\n\n### Description\n\nThe development server (ng serve), which uses Vite/esbuild, consistently injects large, inline Base64 source maps into every JavaScript file it serves.\n\nThis behavior occurs even when source maps are explicitly disabled in angular.json and/or tsconfig.json. The most problematic aspect is that this transformation is also applied to pre-built, third-party packages from node_modules.\n\nThis unnecessarily inflates file sizes (often by 2-3x), which slows down page loads in development and makes debugging in browser DevTools more difficult due to the massive file content. The core issue is that the configuration to disable this behavior is not being respected. \n\n### Minimal Reproduction\n\n1.  Create a new Angular project:\n    ```bash\n    ng new sourcemap-repro\n    cd sourcemap-repro\n    ```\n2.  In `angular.json`, modify the configuration for the development server to explicitly disable all source maps. Under `projects.sourcemap-repro.architect.build.configurations.development`, set the `sourceMap` option:\n    ```json\n    \"sourceMap\": false\n    ```\n    *(Alternatively, using a more granular object like `{\"scripts\": false, \"styles\": false, \"vendor\": false}` also fails to prevent the issue.)*\n\n3.  Run the development server:\n    ```bash\n    ng serve\n    ```\n4.  Open the application in a browser and launch the developer tools (e.g., Chrome DevTools).\n5.  Navigate to the \"Network\" tab, refresh the page, and inspect any `.js` file (e.g., `main.js`, `polyfills.js`, or a chunk from `@angular/core`).\n6.  View the \"Response\" or \"Source\" for that file.\n\n**Expected Behavior:**\nThe served JavaScript files should **not** contain an inline source map. The file should end without a `//# sourceMappingURL=...` comment.\n\n**Actual Behavior:**\nEvery JavaScript file has a large inline Base64 source map appended to it, directly contradicting the configuration in `angular.json`.\n\n\n\n### Exception or Error\n\n```text\n\n```\n\n### Your Environment\n\n```text\nAngular CLI: 19.2.14\nNode: 20.19.0\nPackage Manager: npm 10.8.2\nOS: darwin arm64\n\nAngular: undefined\n...\n\nPackage                         Version\n---------------------------------------------------------\n@angular-devkit/architect       0.1902.15\n@angular-devkit/build-angular   19.2.14\n@angular-devkit/core            19.2.14\n@angular-devkit/schematics      19.2.14\n@angular/cli                    19.2.14\n@angular/compiler               19.2.14\n@angular/compiler-cli           19.2.14\n@angular/language-service       19.2.14\n@schematics/angular             18.2.11\nng-packagr                      18.2.1\ntypescript                      5.7.2\nzone.js                         0.15.0\n```\n\n### Anything else relevant?\n\n\u003cimg width=\"793\" height=\"356\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/22cd3964-aa0d-432a-987a-eb50664007de\" /\u003e","author":{"url":"https://github.com/AlonMiz","@type":"Person","name":"AlonMiz"},"datePublished":"2025-09-28T14:33:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/31331/angular-cli/issues/31331"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bb49556f-b475-0674-c30f-9b8fd5a16d33
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB88:3615A2:BC949B:1043D72:696506BB
html-safe-nonce1851b3b89898fbf62a5872d8d36d8da08708b3e9cf418b3ebc6c311b09aecd74
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjg4OjM2MTVBMjpCQzk0OUI6MTA0M0Q3Mjo2OTY1MDZCQiIsInZpc2l0b3JfaWQiOiI0OTUyMzE3MzIwOTM1ODM1MzIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1f4f160504ee8e9a95f8d85481e6356bf58d1ba069e29953517fa5b05c5674af
hovercard-subject-tagissue:3461987415
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/31331/issue_layout
twitter:imagehttps://opengraph.githubassets.com/20e7f621fd132096ae4d3fccb5658882afff31b71814851db134b68bf46e0a80/angular/angular-cli/issues/31331
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/20e7f621fd132096ae4d3fccb5658882afff31b71814851db134b68bf46e0a80/angular/angular-cli/issues/31331
og:image:altCommand serve Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The development server...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAlonMiz
hostnamegithub.com
expected-hostnamegithub.com
None5ab78b37645aad755632aa5585d27672721953ada88ee2fd72e109792b528c77
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasead8012c2b69c74234a24730a05d4683cea54801a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/31331#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F31331
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F31331
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/31331
Reloadhttps://github.com/angular/angular-cli/issues/31331
Reloadhttps://github.com/angular/angular-cli/issues/31331
angular https://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Notifications https://github.com/login?return_to=%2Fangular%2Fangular-cli
Fork 11.9k https://github.com/login?return_to=%2Fangular%2Fangular-cli
Star 27k https://github.com/login?return_to=%2Fangular%2Fangular-cli
Code https://github.com/angular/angular-cli
Issues 264 https://github.com/angular/angular-cli/issues
Pull requests 22 https://github.com/angular/angular-cli/pulls
Actions https://github.com/angular/angular-cli/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/angular/angular-cli/security
Please reload this pagehttps://github.com/angular/angular-cli/issues/31331
Insights https://github.com/angular/angular-cli/pulse
Code https://github.com/angular/angular-cli
Issues https://github.com/angular/angular-cli/issues
Pull requests https://github.com/angular/angular-cli/pulls
Actions https://github.com/angular/angular-cli/actions
Security https://github.com/angular/angular-cli/security
Insights https://github.com/angular/angular-cli/pulse
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/31331
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/31331
Bughttps://github.com/angular/angular-cli/issues?q=type:"Bug"
#31510https://github.com/angular/angular-cli/pull/31510
ng serve with esbuild/Vite ignores sourceMap configuration, injecting large inline source maps into all fileshttps://github.com/angular/angular-cli/issues/31331#top
#31510https://github.com/angular/angular-cli/pull/31510
area: @angular/buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fbuild%22
devkit/build-angular:dev-serverhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22devkit%2Fbuild-angular%3Adev-server%22
freq1: lowOnly reported by a handful of users who observe it rarelyhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity3: brokenhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
https://github.com/AlonMiz
https://github.com/AlonMiz
AlonMizhttps://github.com/AlonMiz
on Sep 28, 2025https://github.com/angular/angular-cli/issues/31331#issue-3461987415
https://private-user-images.githubusercontent.com/1812912/494871056-22cd3964-aa0d-432a-987a-eb50664007de.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjgyMjg4NDAsIm5iZiI6MTc2ODIyODU0MCwicGF0aCI6Ii8xODEyOTEyLzQ5NDg3MTA1Ni0yMmNkMzk2NC1hYTBkLTQzMmEtOTg3YS1lYjUwNjY0MDA3ZGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTJUMTQzNTQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTk5MDMwZTMyMmQ3N2MyNWVlNzcwNjUzNjM0YzQ0NWY1NDM0NTJhZjVjYmIxNDdmMWQ4NDQyOGI1YjVmNzNmYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.iRX8ZUiTNoOB7V8x7we6xra1SGvPtmD_2xkMFHfUKog
area: @angular/buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fbuild%22
devkit/build-angular:dev-serverhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22devkit%2Fbuild-angular%3Adev-server%22
freq1: lowOnly reported by a handful of users who observe it rarelyhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity3: brokenhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Bughttps://github.com/angular/angular-cli/issues?q=type:"Bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.