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

Support ES6 imports #56

Open
lukehorvat opened this issue Sep 9, 2015 · 3 comments
Open

Support ES6 imports #56

lukehorvat opened this issue Sep 9, 2015 · 3 comments

Comments

@lukehorvat
Copy link

Tried this:

import detective from 'detective';
import fs from 'fs';

let src = fs.readFileSync(__filename);
let requires = detective(src, { parse: { ecmaVersion: 6, sourceType: 'module' } });

console.log(requires);

Prints out [] instead of ['detective', 'fs']. Could we make detective support ES6 imports?

@tnrich
Copy link

tnrich commented Oct 18, 2015

+1 for this!

@mrjoelkemp
Copy link

That may be outside of the scope of this module. Try https://www.npmjs.com/package/detective-es6.

@egoist
Copy link

egoist commented Feb 5, 2017

just made something similar https://github.com/egoist/konan

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

4 participants