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.