From 94411c550995fe727220d64e420b738d8be1d905 Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 11 Sep 2024 17:35:32 -0600 Subject: [PATCH] [Storybook] Mute SASS mixed-decls warnings (#192648) ## Summary This extends #190348 to the Storybook build because it is quite noisy there as well. Example: https://buildkite.com/elastic/kibana-pull-request/builds/233585#0191e2ad-bc90-45f1-b375-959f3fc22b98/268-294 Remediation will be tracked at https://github.com/elastic/kibana/issues/190345 ### Testing The Storybook build step should not have SASS deprecation warnings. --- packages/kbn-storybook/src/webpack.config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index fb901692e7f66c..94302fdc19c411 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -120,6 +120,18 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { sassOptions: { includePaths: [resolve(REPO_ROOT, 'node_modules')], quietDeps: true, + logger: { + warn: (message: string, warning: any) => { + // Muted - see https://github.com/elastic/kibana/issues/190345 for tracking remediation + if (warning?.deprecationType?.id === 'mixed-decls') return; + + if (warning.deprecation) + return process.stderr.write( + `DEPRECATION WARNING: ${message}\n${warning.stack}` + ); + process.stderr.write('WARNING: ' + message); + }, + }, }, }, },