fix options.sourceFileName gennerate bug#260
fix options.sourceFileName gennerate bug#260creeperyang wants to merge 2 commits intobabel:masterfrom
Conversation
|
1.) Can you get this rebased and up to date so we can get it reviewed and landed? |
|
@d3viant0ne okay, I will do it. |
Current coverage is 81.69% (diff: 100%)@@ master #260 diff @@
==========================================
Files 5 6 +1
Lines 140 153 +13
Methods 21 22 +1
Messages 0 0
Branches 30 33 +3
==========================================
+ Hits 112 125 +13
Misses 13 13
Partials 15 15
|
|
Any reason we can't get this merged? This is causing me some pretty serious issues at the moment! Massive thanks to @creeperyang for sorting this! I would have never though of this... |
|
@creeperyang I also would love to see this merged. Is this PR still alive? |
|
@NickStefan - I'll give him a another day to respond and if we don't hear anything, i'll get in in directly. |
|
Yeah, still alive. (conflicts resolved). |
* improve sourceFileName gennerate logic with new relative method * add test for relative method
|
Merged in 501d60d |
|
@creeperyang I kind of reverted this change and fixed it in a different way. This PR broke some cases on windows. #334 #339 |
* improve sourceFileName gennerate logic with new relative method * add test for relative method
One corner usage:
It seems just okay, but when
webpackusewebpack.optimize.UglifyJsPluginwith sourceMap, compilation will run into error. Becausewebpack.optimize.UglifyJsPluginwill try to access source map via'/private/tmp/wow/app.js'.More info see webpack/webpack#2616
So we should fix the
relative.webpackusesource-maphandle source map, andsource-mapuse its ownrelative: https://github.com/mozilla/source-map/blob/master/lib/util.js#L188-L226Here I just replace
path.relativewithsource-map'sutil.relative, and It will fix this error.