Suppose I have the following module:
var modulesReq = require.context(\'.\', false, /\\.js$/); modulesReq.keys().forEach(function(module) { modulesReq(modu
Installing
babel-plugin-transform-require-context
package and adding the plugin in the .babelrc resolved the issue for me. Refer to the documentation here: https://www.npmjs.com/package/babel-plugin-transform-require-context