From e4a472c43a9b7a5fd5592fa3d00cc0c35c2ab837 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 26 Jun 2020 13:57:20 +0200 Subject: [PATCH] SONAR-13567 Fix measure graph zoom error --- server/sonar-web/config/webpack.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/config/webpack.config.js b/server/sonar-web/config/webpack.config.js index 1efb0408457..1744d7cee5d 100644 --- a/server/sonar-web/config/webpack.config.js +++ b/server/sonar-web/config/webpack.config.js @@ -70,7 +70,12 @@ module.exports = ({ production = true, release = false }) => { // 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: { -- 2.39.5