Skip to content

fix(config): pass logLevel to rolldown during config bundling (fix #21971)#22021

Open
cyphercodes wants to merge 1 commit intovitejs:mainfrom
cyphercodes:fix-silent-loglevel-config
Open

fix(config): pass logLevel to rolldown during config bundling (fix #21971)#22021
cyphercodes wants to merge 1 commit intovitejs:mainfrom
cyphercodes:fix-silent-loglevel-config

Conversation

@cyphercodes
Copy link
Copy Markdown
Contributor

This PR fixes issue #21971 where resolveConfig({ logLevel: 'silent' }) was not suppressing Rolldown warnings during config file bundling.

Problem

When using resolveConfig({ logLevel: 'silent' }), Rolldown warnings were still being displayed during the config file bundling process. This happened because the logLevel option was not being passed to the rolldown() call in bundleConfigFile.

Solution

  • Modified bundleConfigFile to accept an optional logLevel parameter
  • Modified bundleAndLoadConfigFile to accept and forward logLevel
  • Updated the call site in loadConfigFromFile to pass logLevel to the bundler
  • The logLevel is now passed directly to the rolldown() call, which respects the 'silent' setting

Changes

  • packages/vite/src/node/config.ts: Added logLevel parameter to bundleConfigFile and bundleAndLoadConfigFile, passed it to the rolldown() call

Tested locally by running the existing config tests - all 63 tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant