-
Notifications
You must be signed in to change notification settings - Fork 66
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
Invalid property of 'default' #27
Comments
Because there's a build process, like most JS packages these days - the index.js on github is the raw source (that probably won't work in most engines), and what you're looking at is the babel-compiled ES5 version. If you're getting a babel-jest error, what's your |
Aha, that makes sense :) About the error, the thing is that when I load babel-plugin-dynamic-import node via
and this is where it fails. I reported it as a bug to Jest, but they put it off by saying that it seems like an issue with dynamic import plugin. I don't know, but the more I dig in it, the more it seems like it actually is an issue of this plugin, because all other babel plugins load fine and don't return this error when using custom transformer. |
For now, you need to add a |
It's certainly something this package should have fixed initially, but "not a root .babelrc" isn't a common use case, so we didn't anticipate it. |
+1 - We ran into the
EDIT: As of the latest version of this package, this workaround seems to be unnecessary. |
This is index.js of babel-plugin-dynamic-import-node which I downloaded from npm, also v.1.0.2
Why is it completely different than index.js here, in this repo?
Btw. the one on GitHub doesn't seem to work (still returns unexpected token), the one on npm works, but only after you add
module.exports = exports["default"]
at the end of index.js, otherwisebabel-jest
returnsPlugin 1 specified in "base" provided an invalid property of "default"
The text was updated successfully, but these errors were encountered: