-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Importing individual method fails with "Class is not a constructor" #139
Comments
Is this code of any help? #14 (comment) |
That example includes a path-based import which would break when the referenced file is moved. I would not consider it a stable interface. |
Yes this is a workaround not a complete solution. |
The underlying issue is this: By spec, you cannot bind an exported method, which is causing the code to error on
For anyone struggling to get this working, here's a hacky workaround:
|
Anyone able to get a pull request over to fix this? Or is it not a problem anymore? |
I'd like to import only the
dereference
method (the other parts of this module should ideally be tree-shaken out), but it seems this is currently not possible because of this error:Importing the default export works as expected in comparison:
The text was updated successfully, but these errors were encountered: