Open anodynos opened 11 years ago
Hey @anodynos, I would like to adopt uRequire, but solid source maps support is a blocker for me. Any word on this? Is it just lack of time / priority or is this ticket really hard to do?
Hey @sholladay - on v0.7.x (still beta, but very stable) there is some progress made on how the templates are rendered, but no actual work on SourceMaps. I guess there is quite a level of difficulty if we want to make transparent for the user, having all the involved parties (coffeescript, coco, livescript, uglify, esprima, escodegen & urequire's templating system - and soon es6 etc) all transforming and passing the relevant sourcemap down the line. But I haven't worked with any source maps libs yet, so it might be easier that I thought. I do hope I can work on this the next few months, but no guarantees! Surely you can adopt it as it is and see if it suit you - INMHO I think in 95% of the cases an average-and-above developer can understand where they are, without sourcemaps.
Unfortunately, my use case is for 3rd party enterprise SaaS, meaning our product goes on other people's websites and has to be as small as possible, so we have to minify and debugging is already hard with that as is.
Would a bounty help?
Oh, if you have to use minification only, then yes you're in a tough place. I was stating its easy to follow but for coffee compiled code or the template conversion / decoration etc, not the minification!
A bounty would perhaps help - I think I will post it as a bounty after I release v0.7.0 & improve the docs!
Regards
Regards
Generating SourceMaps when converting Modules with Template (UMD / AMD / nodejs / combined) would be very desirable in the future - there is no code that deals with it as of v0.6.
Currently you can only compile to .js (NOT template) and keep the SourceMaps info, with the help of a
ResourceConverter
.This one for example finds and adjusts the build-in
coffee-script
RC :TextResource
(instead ofModule
)resource.sourceMapInfo
Changes are needed in
Module
+ModuleGeneratorTemplates
.