nativescript-cli
nativescript-cli copied to clipboard
option to set location for sourcemaps (for console logs)
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 formatapp:///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 ?
Hey @farfromrefug , In case the parsing of the source map fails (which probably happens in your scenario), the thing that will not be as usual are the logs CLI shows, i.e. they will not point to the real files, but instead will have stacktrace from bundle.js, vendor.js, etc. Is this the issue you want to resolve with this feature request or something else is not working on your side?
@rosen-vladimirov yes sorry for not being clear enough. Indeed what is failing for me when using sentry is the cli logging and sourcemap use
@farfromrefug I uploaded the sourceMap file to sentry put unfortunately it didn't work, is there a specific --url-prefix I should use while uploading the .map files?
Yes use app:///
@farfromrefug not working for me :(
@bellalMohamed let s move that discussion to slack or discords. I am on both
@bellalMohamed let s move that discussion to slack or discords. I am on both
NativeScript channel or private?
whatever. Best to share it with others i guess
@farfromrefug @bellalMohamed Did you get this working in the end?
@vandammeb check this repo from @farfromrefug https://github.com/farfromrefug/ns-forecastie
@bellalMohamed Can you help with envs in this repo)
Can't do work it without SENTRY_PREFIX
and SOURCEMAP_REL_DIR
envs
@Kolobok12309 should ask that on Discord. You can find me there. I ll help