NativeScript / NativeScript/nativescript-cli

option to set location for sourcemaps (for console logs)

Open
#5,232 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

device logs feature
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Ok so to get sourcemaps fully working with Sentry, i have to modify quite a few things:

  • change the location of sourcemaps (like with hidden sourcemaps)
  • force sourceMappingURL to follow the format app:///bundle.js.map (so no mention to the relative path where source maps are located).

Consequently sourceMapConverter will fail here because this is the wrong location. I guess it tries to find the sourcemap in the same dir as the source itself. Or even what does it do with app:///

Do you think it would be possible to define somewhere (project wise) the location of the sourcemaps. May be using https://github.com/thlorenz/convert-source-map#frommapfilecommentcomment-mapfiledir ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lib/services/log-source-map-service.ts at the sourceMapConverter call and trace how console-log sourcemap locations are resolved. Check the issue's convert-source-map reference and existing project configuration paths. Done means a project-level sourcemap location can support the requested Sentry app:///bundle.js.map format without breaking source lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.