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

First pass test matches ES6 modules as CommonJS modules making namedExports unusable #36

qgustavor opened this issue Jan 30, 2016 · 1 comment


None yet
2 participants
Copy link

commented Jan 30, 2016

From the source the first time test detects using an simple regular expression could be a CommonJS module, trying to find expressions like "require" and "exports". As it's a simple test sometimes it matches those expressions in strings and comments (example: "required" from Apache License), making it try to transform the file as a CommonJS module.

When transforming the file it ends up not finding any exports and normally it returns null, except when namedExports is used. Maybe it can be changed to a warning and/or the first pass test me improved in some way to ignore strings and comments.


This comment has been minimized.

Copy link

commented Jan 31, 2016

Thanks! Was a simple typo – fixed in 2.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.