I maintain a single page create-react-app app. I needed to create a daily background job that uses some of the models in my create-react-app. Using the models was difficult because my models use Babel, which usually React loads correctly. But, React does not load Babel for background processes.
The following are steps to create a background process:
1. Install Babel in the Project: npm install --save babel-cli babel-plugin-transform-class-properties babel-preset-es2015 babel-preset-react babel-register The following are the current versions of these Babel libs at the time of writing: