Skip to content

Instantly share code, notes, and snippets.

@dandigangi
Created September 18, 2018 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dandigangi/66cf063e61138cba34752362364d98b0 to your computer and use it in GitHub Desktop.
Save dandigangi/66cf063e61138cba34752362364d98b0 to your computer and use it in GitHub Desktop.
// Babel Deps
"@babel/core": "7.1.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "7.1.0",
"@babel/preset-react": "7.0.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "8.0.1",
"babel-jest": "23.6.0",
"babel-loader": "8.0.2",
"babel-polyfill": "6.26.0",
// Testing
"jest": "23.6.0",
"jest-enzyme": "6.0.4",
"enzyme": "3.6.0",
"enzyme-adapter-react-16": "1.4.0",
"enzyme-to-json": "3.3.4",
// Webpack
"webpack": "4.17.2",
// Webpack Loader
{
test: /\.jsx?$/,
exclude: EXCLUDE_DIRS,
include: SRC_DIR,
loader: 'babel-loader',
options: {
presets: [
'@babel/env',
'@babel/react',
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
],
},
},
// .babelrc
{
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-runtime",
"react-hot-loader/babel"
],
"presets": [
"@babel/env",
"@babel/react"
],
}
@dandigangi
Copy link
Author

Looks like maybe it was related to jest and babel-jest not matching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment