#14731·meteor

rspack: --inspect dumps the whole bundler config on every build

Author: perberglandCreated Sep 9, 2026Updated Sep 14, 2026
Labelsmodern-build-stack

Summary

meteor run --inspect makes the rspack build print its entire configuration on every compile. Two console.logs in npm-packages/meteor-rspack/rspack.config.js are gated on Meteor.isDebug || Meteor.isVerbose:

// rspack.config.js:448
if (Meteor.isDebug || Meteor.isVerbose) {
  console.log("[i] Rspack mode:", mode);
  console.log("[i] Meteor flags:", Meteor);
}

// rspack.config.js:912
if (Meteor.isDebug || Meteor.isVerbose) {
  console.log("Config:", inspect(config, { depth: null, colors: true }));
}

isDebug is not a build-verbosity flag. In tools-core:

isMeteorAppDebug() {
  return Package.meteor?.Meteor.isDebug
    || !!process.env.NODE_INSPECTOR_IPC
    || !!process.env.VSCODE_INSPECTOR_OPTIONS
    || Object.keys(global.currentCommand?.options || {})
         .some(o => ['inspect', 'debug', 'brk'].includes(o));
}

So passing --inspect, --debug or --inspect-brk — i.e. asking for a Node debugger for your application — also opts you into a full dump of bundler internals. There is no app-level way to turn it back off, because isDebug comes from the command options rather than from config.

Reproduction

Any Modern/rspack app:

meteor run --inspect=9239

Each bundle prints the complete Meteor flag object, then the whole rspack config with inspect(config, { depth: null }) — resolve fallbacks for every Node builtin, every plugin instance, watchOptions, experiments, and so on. It repeats per bundle (client and server) and again on each rebuild.

In a real app this is a few hundred lines per start, which buries the output that matters — compile errors, lint results, and the app's own logs.

Expected

--inspect attaches a debugger. It should not change build logging.

Suggested fix

Gate both dumps on isVerbose alone. That flag already exists in the same file (const isVerbose = !!Meteor.isVerbose;, line 281) and already governs how chatty the build is:

// rspack.config.js:539
const shouldLogVerbose = isProfile || isVerbose;
const loggingConfig = shouldLogVerbose
  ? {}
  : { stats: "errors-warnings", infrastructureLogging: { level: "warn" } };

So meteor.modern.verbose in package.json is the natural opt-in for config dumps, and it keeps all build-verbosity decisions on one flag. Anyone who wants the dump while debugging can still set it.

Verified against a real app (Meteor 3.5.2, @meteorjs/rspack 2.2.0) with the two gates changed to isVerbose, running meteor run --inspect=9239:

  • Meteor flags: dump: 0
  • Config: dump: 0
  • Debugger listening still present, app boots normally
  • dev-server startup output drops from several hundred lines to 46

PR against release-3.6 follows.

Note

The same isDebug/verbose conflation appears in packages/rspack/rspack_plugin.js, where roughly eight [i] lines (npx/npm/yarn prefixes, app ignores, entrypoints, config paths, devserver port) are gated on isMeteorAppDebug() || isMeteorAppConfigModernVerbose(). Those are single lines rather than full object dumps, so I left them alone to keep the change reviewable — happy to move them too if you'd prefer consistency.