--- title: Upload source maps for Angular showStepsToc: true --- import CLIDownload from '../_snippets/cli/download.mdx' import CLIAuthenticate from '../_snippets/cli/authenticate.mdx' import InjectSourceMap from './_snippets/inject-source-map.mdx' import UploadSourceMap from './_snippets/upload-source-map.mdx' You can configure Angular to [generate source maps](https://angular.dev/reference/configs/workspace-config#source-map-configuration) by adding the following to your `angular.json` file: ```json file=angular.json focusOnLines=4-14 { "projects": { "my-app": { "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "sourceMap": { "scripts": true, // + "styles": true, // + "hidden": true, // + "vendor": true // + } } } } } } } ``` Then, build your Angular application: ```bash ng build --configuration production ``` Confirm that the source maps are generated in the `dist//` directory. You should see a `.js.map` file for each JS bundle. Confirm that the served files are injected with the correct source map comment in production in dev tools: You should see a comment like this in your minified JS files, for example `main-IX6K2QJM.js`: ```js //# chunkId=0197e6db-9a73-7b91-9e80-4e1b7158db5c ``` Before proceeding, confirm that source maps are successfully uploaded to PostHog. Check symbol sets in PostHog