Permalink
Browse files

add sourceURL for better debugability. fixes #1

  • Loading branch information...
1 parent 36c171f commit 16c8d1fe13a9cfb20c147710b40b3da302c73a14 @paulirish paulirish committed May 23, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/es6-module-loader.js
@@ -78,6 +78,9 @@
actualSrc = "'use strict';\n" + actualSrc;
}
+ // add sourceURL so these are treated as script files in a debugger
+ actualSrc += '\n//@ sourceURL=' + self._baseURL + url;
+
evalSrc = eval(actualSrc);
self.set(url, evalSrc);
callback(self._mios[key]);

0 comments on commit 16c8d1f

Please sign in to comment.