Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chokes on ES6 modules. #93

Open
anandthakker opened this issue Jul 1, 2015 · 6 comments
Open

Chokes on ES6 modules. #93

anandthakker opened this issue Jul 1, 2015 · 6 comments

Comments

@anandthakker
Copy link

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?

@anandthakker
Copy link
Author

Actually, note that the custom detective thing only addresses this after upstream browserify/detective#54 is fixed.

@terinjokes
Copy link
Contributor

@anandthakker To clarify the traversing the ES6 modules point: it's outside the scope of Browserify until Node does it.

@anandthakker
Copy link
Author

@terinjokes 👍 makes sense.

@glukki
Copy link

glukki commented Feb 8, 2016

Hey! I think time has come ;)

@terinjokes
Copy link
Contributor

@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.

@glukki
Copy link

glukki commented Feb 14, 2016

@terinjokes sorry, my bad. I thought that node v5 already has import implemented :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants