question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request to generate sourcemaps for external services

See original GitHub issue

Bug 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

9reactions
alan-agius4commented, Dec 4, 2018

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 the hidden option, like

sourceMap: {
        hidden: true,
        styles: true,
        scripts: true
},
3reactions
NikolaJankoviccommented, Nov 23, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow sourcemaps from external https server (i.e. azure ...
I am working on allowing SourceMaps to be uploaded to Azure DevOps symbol server using the [https://docs.microsoft.com/en-us/azure/devops/ ...
Read more >
Source Maps - Rollbar Docs
Here is a simple example of using uglify to generate a source map with sources included: uglifyjs script.js --source-map "includeSources=true" --output script.
Read more >
SourceMapDevToolPlugin - webpack
This plugin enables more fine grained control of source map generation. ... true ( boolean ): Indicates whether loaders should generate source maps....
Read more >
Source maps for JavaScript · Raygun Docs
Source maps are a useful tool for debugging and fixing minified JavaScript code. Raygun supports source map decoding - find out how in...
Read more >
Feature Layers | Guide | ArcGIS API for JavaScript 3.42
Feature layers honor any feature templates configured in the source map document. ... When you create a feature service, you also need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found