// This avoid having multi instance of react when developing with yarn link on sonar-ui-common
// See https://reactjs.org/warnings/invalid-hook-call-warning.html
react: path.resolve(__dirname, '../node_modules/react'),
- 'react-dom': path.resolve(__dirname, '../node_modules/react-dom')
+ 'react-dom': path.resolve(__dirname, '../node_modules/react-dom'),
+ // d3-selection exports an event object, which requires live-binding.
+ // In order to support this, we need to tell Webpack to NOT look into
+ // the dist/ folder of this module, but in the src/ folder instead.
+ // See https://github.com/d3/d3-selection#event
+ 'd3-selection': path.resolve(__dirname, '../node_modules/d3-selection/src/index.js')
}
},
optimization: {