From eca61bc02e5bbd7fdc1ab2f6d282ffe3ef9f5569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 26 May 2026 12:04:56 +0200 Subject: [PATCH] fix(cli): narrow protobufjs warning suppression to specific message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- packages/cli-module-build/src/lib/bundler/config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli-module-build/src/lib/bundler/config.ts b/packages/cli-module-build/src/lib/bundler/config.ts index e2de9ef2c8..8d6d92050e 100644 --- a/packages/cli-module-build/src/lib/bundler/config.ts +++ b/packages/cli-module-build/src/lib/bundler/config.ts @@ -401,7 +401,11 @@ export async function createConfig( // but webpack/rspack still statically analyzes the source and emits a // "Critical dependency" warning. Safe to suppress. // See https://github.com/protobufjs/protobuf.js/issues/2057 - { module: /@protobufjs[\\/]inquire/ }, + { + module: /@protobufjs[\\/]inquire/, + message: + /Critical dependency: the request of a dependency is an expression/, + }, // TODO: remove this warning skipping as soon as the corresponding bundler limitation // described in issue https://github.com/web-infra-dev/rspack/issues/13635 is fixed // when PR: https://github.com/web-infra-dev/rspack/pull/13636 is merged.