Feature request to generate sourcemaps for external services
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Command (mark with an x
)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Desired functionality
Angular cli doesn’t support functionality that would enable uploading sourcemaps to an external service.
Right now if you build with sourcemaps the .map files are generated and their filepath is referenced in the bundle as a comment. The only use case that supports is if you want to host the sourcemaps on the site which has a lot of disadvantages. In most cases you want to generate the sourcemaps and upload them directly to a service that requires them (i.e. sentry) so that they remain private.
Creating 2 independent builds - one with sourcemaps and one without - deploying the latter and uploading the former to a third party service does not work because the filepath reference to the .map file changes the bundle file hash and therefore the 2 builds have different filenames.
Desired functionality would involve passing an argument that would generate .map files in a separate directory under /dist without their filepath referenced in the bundle files as a comment.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7
Hi, this has been implemented and addressed in the latest beta (7.2.0-beta.0) with https://github.com/angular/angular-cli/pull/13062
In your
angular.json
you can now use thehidden
option, like@templth I’m still working on having it done but its a lot more involved than I originally thought. I’ll hopefully have a pull request in the next few weeks.