]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13567 Fix measure graph zoom error
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 26 Jun 2020 11:57:20 +0000 (13:57 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 30 Jun 2020 20:05:42 +0000 (20:05 +0000)
server/sonar-web/config/webpack.config.js

index 1efb0408457c3d95d06035e15beb45304475a465..1744d7cee5dc7c4af442d727722fe0fdc0affcb6 100644 (file)
@@ -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: {