Controlling ionic-gulp-browserify-typescript sourcemap

I’m having issue enabling debugging of current ionic@beta --v2 --ts project template output using vscode ide debugger support due to “sourceRoot”:"/source/" in * output vs “sourceRoot”:"/" .

See this for more context.

Any insights on how I instruct gulpflie.js | var buildBrowserify = require(‘ionic-gulp-browserify-typescript’); | buildBrowserify() action to use a “sourceRoot”:"/" setting when transpiling typescript sources and producing bundled www/build/js/ output?


Have similar issue. Did anybody find any way to make this working?
Tried to find something regarding browserify proper sourcemaps settings for new(without webpack) ionic project structure but found nothing useful.

1 Like

Same issue here. As indicated I solved it by configuring sourceRoot to “/”. The only way I found is modifying the source of the module ionic-gulp-browserify-typescript, setting up the sourceRoot parameter:

//.pipe(debug ? sourcemaps.write(’./’) : noop())
.pipe(debug ? sourcemaps.write(’./’,{sourceRoot:’/’}) : noop())

It’s a hack but working for me so far. But what worries me is that in the current development of this plugin ( the sourceRoot parameter is set to “…/…/…/” that is not working for me in vscode.