From 52f34ca11372909f82db9e0bf664331665244fd1 Mon Sep 17 00:00:00 2001 From: Alexander Matyushentsev Date: Tue, 6 Sep 2022 15:52:42 -0700 Subject: [PATCH] fix: rollout extensions should not override global page style Signed-off-by: Alexander Matyushentsev --- ui/package.json | 1 + ui/webpack.config.js | 5 +++++ ui/yarn.lock | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/ui/package.json b/ui/package.json index 9dc0753..dddaba5 100644 --- a/ui/package.json +++ b/ui/package.json @@ -7,6 +7,7 @@ "@types/react-form": "2.16", "argo-rollouts": "git+https://github.com/argoproj/argo-rollouts.git", "classnames": "2.2.6", + "null-loader": "^4.0.1", "react-scripts": "4.0.3", "web-vitals": "^1.0.1" }, diff --git a/ui/webpack.config.js b/ui/webpack.config.js index b88be7b..4357582 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -28,6 +28,11 @@ const config = { configFile: path.resolve('./src/tsconfig.json') }, }, + { + // prevent overriding global page styles + test: path.resolve(__dirname, 'node_modules/argo-ui/src/components/page/page.scss'), + use: 'null-loader', + }, { test: /\.scss$/, use: ['style-loader', 'raw-loader', 'sass-loader'], diff --git a/ui/yarn.lock b/ui/yarn.lock index 2bec469..34abae6 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -7921,6 +7921,14 @@ nth-check@^1.0.2: dependencies: boolbase "~1.0.0" +null-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-4.0.1.tgz#8e63bd3a2dd3c64236a4679428632edd0a6dbc6a" + integrity sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"