x)- [ ] bug report -> please search issues before submitting
- [X] feature request
I'd like to be able to have a the options intsconfig.compilerOptions.* that pertain to sourceMap config to be configurable.
I'm trying to build production assets that have a sourceMapping like the following
//# sourceMappingURL=http://localhost:4200/inline.bundle.js.map
to facilitate debugging by developers in production environments.
To do this I expected to be able to change the tsconfig.compilerOptions.mapRoot to http://localhost:4200/. However it looks like
if (options.sourceMap) {
this._compilerOptions.sourceMap = true;
this._compilerOptions.inlineSources = true;
this._compilerOptions.inlineSourceMap = false;
this._compilerOptions.mapRoot = undefined;
// We will set the source to the full path of the file in the loader, so we don't
// need sourceRoot here.
this._compilerOptions.sourceRoot = undefined;
} else {
this._compilerOptions.sourceMap = false;
this._compilerOptions.sourceRoot = undefined;
this._compilerOptions.inlineSources = undefined;
this._compilerOptions.inlineSourceMap = undefined;
this._compilerOptions.mapRoot = undefined;
this._compilerOptions.sourceRoot = undefined;
}
Overrides the config and doesn't honor what's in the tsconfig.json
Thoughts and opinions appreciated.
+1 for this. Trying to set up private sourcemaps for production error reporting.
I agree. This is undesired behavior. It should only provide a default config instead of overwriting it.
+1 for this. Inline source maps are necessary for debugging in something like Cordova and this code overwrites any custom settings.
Hi, closing this as for error reporting one should use hidden sourcemaps which is a type of sourcemaps specifically used for error reporting productions and solutions.
You can enable this via the configuration.
example;
"build": {
"builder": "@angular-devkit/build-angular:browser",
"configurations": {
"production": {
"sourceMap": {
"hidden": true,
"scripts": true,
"styles": true
},
...
}
}
}
Regarding inline sourcemaps there is another open issue here: https://github.com/angular/angular-cli/issues/13543
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._
Most helpful comment
+1 for this. Trying to set up private sourcemaps for production error reporting.