module-deps
module-deps copied to clipboard
Chokes on ES6 modules.
Currently, running module-deps on source with ES6 module syntax throws Error: Parsing file /blah/dee/dah.js 'import' and 'export' may appear only with 'sourceType: module' (4:0)
.
The reason for this is that acorn
, via detective
, needs a {ecmaVersion: 6, sourceType: 'module'}
, but currently, there's no way to pass those options through.
#63 would address this, although it would only be a superficial fix: module-deps still wouldn't actually traverse ES6 modules. I'm assuming ES6 modules are out of scope here?
Also: anything I could do to help get #63 merged?
Actually, note that the custom detective
thing only addresses this after upstream https://github.com/substack/node-detective/issues/54 is fixed.
@anandthakker To clarify the traversing the ES6 modules point: it's outside the scope of Browserify until Node does it.
@terinjokes :+1: makes sense.
Hey! I think time has come ;)
@glukki Node still does not support ES6 Modules. Browserify is an implementation of the Node module system for the web. With that in mind, it can't implement a module system that Node itself does not.
@terinjokes sorry, my bad. I thought that node v5 already has import implemented :(