-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Custom babel configuration #685
Comments
@rightaway, add
AVA currently only supports transpiling your test files for you. Not your source files. This is why you need to use |
Now it looks like this and has resolved that problem. But I'm getting
|
Hmm. That's weird. Try |
Have just tried it but I get the same error. Any other ideas? |
Can you create a project with a minimal reproduction and upload to github? It will be easier for us to troubleshoot that way. |
Just require babel-polyfill also: "ava": {
"babel": "inherit",
"require": ["babel-register", "babel-polyfill"]
}, |
@spudly works, thank you. Just out of curiosity, it seems like babel-register and babel-polyfill were already in my node_modules folder (probably as dependencies of other babel stuff). Is it good practice to explicitly declare both of these under devDependencies in package.json, or should I just leave it as is? |
@rightaway, I would definitely add it as an explicit dev dependency. |
Description
I have this in my package.json (tried the
inherit
way as well). But when I runava
(version 0.13.0) I get aSyntaxError: Unexpected token import
.In the test file itself, the import seems to work fine
import server from '../index';
, because the error is being reported from within the../index.js
file, so it's strange.Environment
The text was updated successfully, but these errors were encountered: