From c3962292ac96294b9f00663bb3fe5a80d99ef924 Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Fri, 5 Aug 2022 18:27:20 +0200 Subject: [PATCH] SONAR-17142 Fix BubbleChart zoom --- server/sonar-web/config/esbuild-config.js | 5 +++++ server/sonar-web/package.json | 1 + server/sonar-web/yarn.lock | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/server/sonar-web/config/esbuild-config.js b/server/sonar-web/config/esbuild-config.js index fa892c428ba..2d5842ada02 100644 --- a/server/sonar-web/config/esbuild-config.js +++ b/server/sonar-web/config/esbuild-config.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +const path = require('path'); const autoprefixer = require('autoprefixer'); const postCssPlugin = require('esbuild-plugin-postcss2').default; const postCssCalc = require('postcss-calc'); @@ -24,10 +25,14 @@ const postCssCustomProperties = require('postcss-custom-properties'); const documentationPlugin = require('./esbuild-documentation-plugin'); const htmlPlugin = require('./esbuild-html-plugin'); const htmlTemplate = require('./indexHtmlTemplate'); +const alias = require('esbuild-plugin-alias'); const { getCustomProperties, TARGET_BROWSERS } = require('./utils'); module.exports = release => { const plugins = [ + alias({ + 'd3-selection': path.resolve(__dirname, '../node_modules/d3-selection/src/index.js') + }), postCssPlugin({ plugins: [ autoprefixer, diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index a0dce33d5bf..afe61f6840d 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -79,6 +79,7 @@ "enzyme-adapter-react-16": "1.15.6", "enzyme-to-json": "3.6.2", "esbuild": "0.14.31", + "esbuild-plugin-alias": "0.2.1", "esbuild-plugin-postcss2": "0.1.1", "eslint": "7.17.0", "eslint-config-sonarqube": "1.0.1", diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index 3093ad7005b..13261d115e0 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -2314,6 +2314,7 @@ __metadata: enzyme-adapter-react-16: 1.15.6 enzyme-to-json: 3.6.2 esbuild: 0.14.31 + esbuild-plugin-alias: 0.2.1 esbuild-plugin-postcss2: 0.1.1 eslint: 7.17.0 eslint-config-sonarqube: 1.0.1 @@ -4501,6 +4502,13 @@ __metadata: languageName: node linkType: hard +"esbuild-plugin-alias@npm:0.2.1": + version: 0.2.1 + resolution: "esbuild-plugin-alias@npm:0.2.1" + checksum: afe2d2c8b5f09d5321cb8d9c0825e8a9f6e03c2d50df92f953a291d4620cc29eddb3da9e33b238f6d8f77738e0277bdcb831f127399449fecf78fb84c04e5da9 + languageName: node + linkType: hard + "esbuild-plugin-postcss2@npm:0.1.1": version: 0.1.1 resolution: "esbuild-plugin-postcss2@npm:0.1.1" -- 2.39.5