Skip to content

Instantly share code, notes, and snippets.

@brianjlandau
Last active March 29, 2018 07:41
Show Gist options
  • Save brianjlandau/cb61c4c165b703e97d7e928a2abe29ba to your computer and use it in GitHub Desktop.
Save brianjlandau/cb61c4c165b703e97d7e928a2abe29ba to your computer and use it in GitHub Desktop.
Rails 5.1 webpacker config for react + jest + enzyme
{
"presets": [
[
"env",
{
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}
],
"react",
"es2015"
],
"plugins": [
"syntax-dynamic-import",
[
"transform-class-properties",
{
"spec": true
}
],
"transform-object-rest-spread"
]
}
{
"name": "jester",
"private": true,
"license": "UNLICENSED",
"engines": {
"node": "6.11.2"
},
"scripts": {
"test": "jest"
},
"dependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.26.0",
"babel-loader": "7.x",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"classnames": "^2.2.5",
"coffee-loader": "^0.7.3",
"coffee-script": "^1.12.7",
"compression-webpack-plugin": "^1.0.0",
"core-js": "^2.5.0",
"css-loader": "^0.28.4",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"form-serialize": "^0.7.2",
"gangway": "^2.2.0",
"glob": "^7.1.2",
"history": "^4.6.3",
"immutable": "^3.8.1",
"js-yaml": "^3.9.1",
"microcosm": "^12.10.0",
"node-sass": "^4.5.3",
"path-complete-extname": "^0.1.0",
"postcss-loader": "^2.0.6",
"postcss-smart-import": "^0.7.5",
"precss": "^2.0.0",
"promise": "^8.0.1",
"prop-types": "^15.5.10",
"rails-erb-loader": "^5.1.0",
"react": "^15.6.1",
"react-autocomplete": "^1.7.1",
"react-dom": "^15.6.1",
"react-guard": "^0.5.0",
"react-immutable-proptypes": "^2.1.0",
"react-modal": "^2.2.4",
"react-router": "^4.1.2",
"react-router-dom": "^4.1.2",
"react-switch-button": "^2.2.2",
"resolve-url-loader": "^2.1.0",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"superagent": "^3.5.2",
"titlecase": "^1.1.2",
"webpack": "^3.5.5",
"webpack-manifest-plugin": "^1.3.1",
"webpack-merge": "^4.1.0"
},
"devDependencies": {
"babel-jest": "^20.0.3",
"enzyme": "^2.9.1",
"jest": "^20.0.4",
"jest-css-modules": "^1.1.0",
"react-test-renderer": "^15.6.1",
"webpack-dev-server": "^2.7.1"
},
"jest": {
"roots": [
"app/javascript/__tests__/"
],
"moduleDirectories": [
"node_modules",
"app/javascript",
"app/javascript/__tests__"
],
"moduleNameMapper": {
"\\.(s?css)$": "<rootDir>/node_modules/jest-css-modules"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment