-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate sourcemap #5
Comments
@mamciek This options is already there but is not in the docs yet because we had a problem with it. I just fixed the underlaying issue. Will update the docs after running a few end-to-end tests. In the meantime give latest bits a whirl and see how that works out for you. To enable it for all bundles use bundleOptions property: jspm({
bundleOptions: {
sourceMaps: true
}
}); You can also specify it as an option to a specific bundle: jspm({
bundles: [
{ src: 'a', dst: 'a-bundle.js', options: { sourceMaps: true } }
]
}); HTH |
it works but it does not add sourceMappingUrl at the end of file like so: |
I try to bundle ts files and the sourcemap generated is basically empty: This happens when I remove external dependencies: What is the right way to generate the sourcemap needed? |
I am also seeing what @mamciek is seeing—there is no Also, is this compatible with https://github.com/floridoo/gulp-sourcemaps? When I use jspm+ gulp.task('build-app', () => (
jspmBuild({
bundleSfx: true,
bundleOptions: { minify: true, sourceMaps: true, sourceMapContents: true },
bundles: [ { src: 'main', dst: 'main-bundle.js' } ]
})
.pipe(sourcemaps.init())
.pipe(rev())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./public/js'))
.pipe(rev.manifest())
.pipe(gulp.dest('./public/js'))
)); Output:
|
systemjs-builder only adds the |
@OliverJAsh Thanks for chasing this up. I've pushed a version which appends the sourceMappingUrl comment. However, it seems to be a bit tricky to make it work for non sfx bundles. When systemjs downloads a bundled package, it wraps it around a call to System.register... so the comment appended to the file ends up in that :-) |
@mamciek Could you please check if 0.0.13 works for you? Thanks! |
I've just been looking into |
This actually makes perfect sense. Very cool idea. Does it also mean, we can perhaps remove minify support as well? Because you can use gulp plugin for minify. |
Perhaps, but maybe just keep it in there for ultimate flexibility? On Wed, 25 Nov 2015 at 10:36 Buddhike de Silva notifications@github.com
|
Sure, agreed!
|
Is it possible to pass option to jspm to tell it that it should generate sourcemap for bundle?
The text was updated successfully, but these errors were encountered: