Skip to content

Enable building with source maps generated as inline-source-map #13543

@ryaa

Description

@ryaa

🚀 Feature request

Enable configure angular-cli to create inline source maps.
The problem is that it is not possible to debug hybrid/cordova based apps built with angular on android devices. The reason is that Chrome debugger cannot access the source map file on the device. The solution/fix is to include the source map inline

For example, here is one of the issue related to this #6674
The temporary hack described here however it would be very helpful to be able to configure angular cli using standard methods to generate inline source maps.

Command (mark with an x)

- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

A clear and concise description of the problem or missing capability...

As I understand (based on @angular-devkit/build-angular) angular cli either uses eval or source-map as a webpack devtool option (https://webpack.js.org/configuration/devtool/). There is no standard way to use a different devtool option for source maps generated.

Describe the solution you'd like

If you have a solution in mind, please describe it.

Add devtool or similar build option (smth like deprecated evalSourceMap build option but allowing to set any supported webpack devtool option)

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Options 1) The temporary hack described here
Option 2) Use custom tools to extend the Angular CLI build behaviour, for example https://github.com/manfredsteyer/ngx-build-plus

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions