Add decorator support (e.g. Mobx) to a React application created with create-react-app
npm install --save-dev react-app-rewired babel-plugin-transform-decorators-legacy- Replace
react-scriptswithreact-app-rewiredin package.json (see below) - Create a new file 'config-overrides.js' at the root of the project (next to node_modules) and copy the content below.
For react-app-rewired < 2.0.1, use https://gist.github.com/imekachi/4edd1d3637bdb02f26c5dc4c371722af