Setting the file. One moment.
Subchapter 8.19
references/option-log-level.mdMarkdown2 KBView on GitHub
The logLevel option controls how much information tsdown displays during the build process.
logLevel?: 'silent' | 'error' | 'warn' | 'info'Default: 'info'
# Suppress all output
tsdown --log-level silent
# Only show errors
tsdown --log-level error
# Show warnings and errors
tsdown --log-level warn
# Show all info (default)
tsdown --log-level infoexport default defineConfig({
entry: ['src/index.ts'],
logLevel: 'error',
})| Level | Shows | Use Case |
|---|---|---|
silent | Nothing | CI/CD pipelines, scripting |
error | Errors only | Minimal output |
warn | Warnings + errors | Standard CI/CD |
info | All messages | Development (default) |
export default defineConfig({
entry: ['src/index.ts'],
logLevel: 'error', // Only show errors in CI
})export default defineConfig({
entry: ['src/index.ts'],
logLevel: 'silent', // No output for automation
})The failOnWarn option controls whether warnings cause the build to exit with a non-zero code. Defaults to false — warnings never fail the build.
export default defineConfig({
failOnWarn: false, // Default: never fail on warnings
// failOnWarn: true, // Always fail on warnings
// failOnWarn: 'ci-only', // Fail on warnings only in CI
})See CI Environment for more about CI-aware options.