While trying to use es6-module-transpiler 0.10.0 on es6-promise, I had problems because readFileSync was used on a directory. After some poking around, it appears that the problem is due to the fact that they have a lib/es6-promise/promise.js and a lib/es6-promise/promise/.
The following patch solved the problem for me:
diff --git a/lib/module.js b/lib/module.js
index 96529c5..a659641 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -136,7 +136,11 @@ memo(Module.prototype, 'ast', /* @this Module _/function() {
* @name Module#src
/
memo(Module.prototype, 'src', /_* @this Module */function() {
While trying to use es6-module-transpiler 0.10.0 on es6-promise, I had problems because readFileSync was used on a directory. After some poking around, it appears that the problem is due to the fact that they have a lib/es6-promise/promise.js and a lib/es6-promise/promise/.
The following patch solved the problem for me: diff --git a/lib/module.js b/lib/module.js index 96529c5..a659641 100644 --- a/lib/module.js +++ b/lib/module.js @@ -136,7 +136,11 @@ memo(Module.prototype, 'ast', /* @this Module _/function() { * @name Module#src / memo(Module.prototype, 'src', /_* @this Module */function() {
Of course it's more a hack than a solution... but it can be helpful nonetheless.