pcardune / handlebars-loader

A handlebars template loader for webpack
559 stars 169 forks source link

Sourcemaps #50

Open SimenB opened 9 years ago

SimenB commented 9 years ago

handlebars@3.0.0 comes with support for sourcemaps. wycats/handlebars.js#902

Any chance of supporting them in this plugin? If I open the hbs file in Chrome, I just see the compiled function (I suppose this allows debugging, but still)

duncanbeevers commented 9 years ago

Took a stab at this here: https://github.com/duncanbeevers/handlebars-loader/tree/source-maps

altano commented 9 years ago

@duncanbeevers this looks nice and simple, thank you for figuring out how to plumb all that. Can you submit it as a pull request? I think the only comment I'll have is to ask you to use node-semver to do the version comparison instead of manually parsing it.

duncanbeevers commented 9 years ago

Thanks for the feedback. I originally wrote this using semver but wasn't sure about adding another dependency for such a minor comparison. I'll tuck that back in shortly.

Do you have any opinion about the filepath stripping? I'm not all that familiar with gulp (or sourcemaps, for that matter) and wasn't sure about the right way to access that bit of info.

maniator commented 8 years ago

@duncanbeevers is there any update on this?