-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
ES6 style import text inside of string breaks packager #6323
Comments
cc @martinbigio |
Also cc @cpojer |
import test from 'test'
We don't use static analysis to analyze dependencies but rather just regex, for performance reasons. Unfortunately that means we can't ignore strings that look like imports/require's. As you suggested, the workaround is string concatenation. |
Thanks for the quick answers and good to know :) |
All of this is in https://github.com/facebook/node-haste :) |
It seems that as soon as you try to have a variable that contains the string to import a module the packer breaks. It's really easy to reproduce: https://rnplay.org/apps/FBm0LQ
The obvious workaround is to have a variable that concatenates the string but does that make sure that there are no other side effects?
The text was updated successfully, but these errors were encountered: