Created by: knajcam
REASONING BEHIND CHANGES: The core module cluster is one of the node core librariers for in browser usage as described by the webpack dependency, node-libs-browser:
It shows that the cluster module has no browser implementation and therefore in the node section of webpack.config it can have the property of 'empty', as done with dgram, fs, child_process etc. For users of create-react app with node.js code that requires cluster, they currently need to use a workaround to avoid ejecting and modifying the Webpack scripts on their own.
There are no side effects to this change, as adding cluster to the node section of the webpack config only affects users ability to run code originally written for the node.js environment in the browser, and as described above cluster has no browser or mock implementation and therefore can be marked as empty without any side effects.
VERIFICATION THAT CHANGES WORK: use case (code that uses log4js-node): before this change errors occurred due to log4js-node requiring the cluster module and Webpack not being able to find a module for it. After adding cluster:'empty' to the webpack config, the code starts up as expected: