Multiple React bundles on a single server Express server (Part-2)
This is the second part of "Multiple React bundles on a single Express server". If you haven't read the first part yet, please go to Multiple React bundles on a single Express server (part 1) . Setup the first React App After setting up the hosting server, we are ready to set up the first React App. In this setup, we are going to use React, Redux, Babel, and Webpack, etc NPM packages. Due to this sharing might become obsolete after tomorrow, we are going to specify the intended version when installing the NPM packages to avoid the problem of having the trouble in following the example. Webpack and shared folder Let us begin by configuring the Webpack and put the sharable code in place. 1. While in the root of the project folder, type following commands at the terminal: npm i react@16.8.3 react-dom@16.8.3 npm i react-redux@6.0.1 redux@4.0.1 redux-thunk@2.3.0 npm i -D babel-core@6.26.3 babel-loader@7.1.5 npm i -D babel-preset-env@1.7.0 babel-preset-react@6.24.1