Commit bdcb0f78 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by GitHub

Add support to transpile import/export syntax (#1044)

next/babel doesn't transpile import/export.
So, we need to do it explicitly, but only for test env.
parent 9348762f
{
"presets": ["next/babel"]
"env": {
"development": {
"presets": ["next/babel"]
},
"production": {
"presets": ["next/babel"]
},
"test": {
// next/babel does not transpile import/export syntax.
// So, using es2015 in the beginning will fix that.
"presets": ["es2015", "next/babel"]
}
}
}
......@@ -15,9 +15,8 @@
"babel-jest": "^18.0.0",
"enzyme": "^2.5.1",
"jest-cli": "^18.0.0",
"react": "^15.3.2",
"react-addons-test-utils": "^15.3.2",
"react-dom": "^15.3.2",
"react-test-renderer": "^15.4.1"
"react-addons-test-utils": "^15.4.2",
"babel-preset-es2015": "^6.22.0",
"react-test-renderer": "^15.4.2"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment