resolveConfig({ logLevel: 'silent' }) does not suppress Rolldown warningsWhen calling resolveConfig({ logLevel: 'silent' }), Rolldown still prints UNRESOLVED_IMPORT warnings to stderr during config file bundling. The logLevel option is not propagated from loadConfigFromFile → bundleConfigFile → rolldown().
npm install
npx tsx repro.ts
No output to stderr — logLevel: 'silent' should suppress all warnings including Rolldown’s bundler warnings.
Rolldown prints UNRESOLVED_IMPORT warning for @vitejs/plugin-react (which is intentionally not installed to trigger the warning):
vite.config.ts (2:19) [UNRESOLVED_IMPORT] Warning: Could not resolve '@vitejs/plugin-react' in vite.config.ts
╭─[ vite.config.ts:2:20 ]
│
2 │ import react from '@vitejs/plugin-react';
│ ───────────┬──────────
│ ╰──────────── Module not found, treating it as an external dependency
───╯
In packages/vite/src/node/config.ts:
resolveConfig({ logLevel: 'silent' })
→ loadConfigFromFile(configEnv, configFile, root, logLevel, ...) // logLevel received
→ bundleAndLoadConfigFile(resolvedPath) // logLevel NOT passed
→ bundleConfigFile(fileName, isESM) // logLevel NOT passed
→ rolldown({ ... }) // no logLevel option
Rolldown’s rolldown() function supports logLevel as an input option, so the fix is to pass it through the chain.