From 16cbb4c24da7bc71014c12dd1c9067721ac20575 Mon Sep 17 00:00:00 2001 From: Shaun Hamilton Date: Fri, 17 Oct 2025 18:05:42 +0200 Subject: [PATCH] dev(client): disable webpack console warnings (#62873) Co-authored-by: Mrugesh Mohapatra --- client/gatsby-node.js | 12 +++++++++++- client/package.json | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/client/gatsby-node.js b/client/gatsby-node.js index b9acd811f3d..0684311aa28 100644 --- a/client/gatsby-node.js +++ b/client/gatsby-node.js @@ -261,7 +261,17 @@ exports.onCreateWebpackConfig = ({ stage, actions }) => { process: require.resolve('process/browser') } }, - plugins: newPlugins + plugins: newPlugins, + ignoreWarnings: [ + warning => { + if (warning instanceof Error) { + if (warning.message.includes('mini-css-extract-plugin')) { + return true; + } + } + return false; + } + ] }); }; diff --git a/client/package.json b/client/package.json index d9becbcc33c..f9be3e1e705 100644 --- a/client/package.json +++ b/client/package.json @@ -20,7 +20,7 @@ "main": "none", "scripts": { "prebuild": "pnpm run common-setup && pnpm run build:scripts --env production", - "build": "NODE_OPTIONS=\"--max-old-space-size=7168\" gatsby build --prefix-paths", + "build": "NODE_OPTIONS=\"--max-old-space-size=7168 --no-deprecation\" gatsby build --prefix-paths", "build:scripts": "pnpm run -F=browser-scripts build", "clean": "gatsby clean", "common-setup": "pnpm -w run create:shared && pnpm run create:env && pnpm run create:trending && pnpm run create:search-placeholder", @@ -28,7 +28,7 @@ "create:trending": "tsx ./tools/download-trending.ts", "create:search-placeholder": "tsx ./tools/generate-search-placeholder", "predevelop": "pnpm run common-setup && pnpm run build:scripts --env development", - "develop": "NODE_OPTIONS=\"--max-old-space-size=7168\" gatsby develop --inspect=9230", + "develop": "NODE_OPTIONS=\"--max-old-space-size=7168 --no-deprecation\" gatsby develop --inspect=9230", "lint": "tsx ./i18n/schema-validation.ts", "serve": "gatsby serve -p 8000", "serve-ci": "serve -l 8000 -c serve.json public",