-
Notifications
You must be signed in to change notification settings - Fork 122
Typescript systemjs-builder bundle sourcemaps #691
Comments
This does seem like a bug to ensure we support picking up existing sourcemaps properly. |
@xealot You could consider using gulp-typescript and gulp-sourcemaps for the typescript compilation. gulp-sourcemaps allows you to completely redefine the source path within the sourcemaps. See eg https://github.com/jp7677/hellocoreclr/blob/aurelia/ui/build/bundle/tscompile.js. That way I was able to keep the mapping correctly to the original typescript files. |
Having the same issue where src and compiled output are split. When I want to apply a SourceMapConsumer for a stacktrace it can't resolve the sourcemap because the paths are off.
Example: Source file at
compiles to
bundles to
Is there anything I can do about this? Is this regarded a bug or am I doing it wrong? If I just use Chrome with the sourcemap to inspect it everything seems to be fine but using mozillas SourceMapConsumer throws the error. Applied code
|
Any news on this, @guybedford? |
If anyone is interested in looking into this, I'll gladly review. |
This might be related: #823 |
@guybedford I'm really sorry about the ticket spam, #681 seemed close to the issue I'm having but I'm really not sure.
My project:
My build:
builder.build()
withsourceMaps
enabledThe bundling step works great but I'm left with two trees of sources from sourcemaps.
One for generated JS source from Typescript (that doesn't work with breakpoints) and one for original TS files (which does work with breakpoints).
The reason for so many entries is because
build()
seems to merge the existing sourcemap definitions with newly generated sourcemaps from the intermediate files.How can I get System builder to pull the sourcemaps forward with the new translation but not create new intermediate sourcemap spam?
I read in your other thread a suggestion to use the typescript plugin for systemjs, but this seems sub-optimal since I don't really want to compile the code in the browser and duplicate the TS config.
The text was updated successfully, but these errors were encountered: