warn() — vite Function Reference
Architecture documentation for the warn() function in pluginContainer.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 3cf1d94a_16a2_96d6_7d1d_9757e22a2557["warn()"] 25e1bd14_1d67_d32d_fef1_fa2f005ed7c1["BasicMinimalPluginContext"] 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 -->|defined in| 25e1bd14_1d67_d32d_fef1_fa2f005ed7c1 00831e67_fe39_7ed4_eed0_e29cb8e15286["warn()"] 00831e67_fe39_7ed4_eed0_e29cb8e15286 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 5a2ddafa_69c5_82bb_4c9e_32634cfa6eed["resolveBuildEnvironmentOptions()"] 5a2ddafa_69c5_82bb_4c9e_32634cfa6eed -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 a016fb65_b1f4_be50_c5c3_d0c8f7b2ab52["resolveRolldownOptions()"] a016fb65_b1f4_be50_c5c3_d0c8f7b2ab52 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 c96008e0_3b87_08ec_3ca8_496b2bf473ab["resolveBuildOutputs()"] c96008e0_3b87_08ec_3ca8_496b2bf473ab -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 5f780e97_091a_dfa9_1506_327f54d41dca["onRollupLog()"] 5f780e97_091a_dfa9_1506_327f54d41dca -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 5db25367_d823_be14_869d_fc9affb91c51["runConfigHook()"] 5db25367_d823_be14_869d_fc9affb91c51 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 9966e250_2f29_7754_7585_ae9ec0f1a2a6["optimizeDepsDisabledBackwardCompatibility()"] 9966e250_2f29_7754_7585_ae9ec0f1a2a6 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 ca966b07_32a3_9d37_9eca_d2ebd25f7f76["scanImports()"] ca966b07_32a3_9d37_9eca_d2ebd25f7f76 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 bfb7f285_fb76_2283_e68f_d806d799034d["runPostCSS()"] bfb7f285_fb76_2283_e68f_d806d799034d -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 297b7917_5996_b011_26d1_5bce9b0e6724["minifyCSS()"] 297b7917_5996_b011_26d1_5bce9b0e6724 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 cc40a51d_2143_be43_f128_4841bfa5e9d3["compileLightningCSS()"] cc40a51d_2143_be43_f128_4841bfa5e9d3 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 a1fc1de5_905b_efe7_d960_3597604fbdfe["importAnalysisPlugin()"] a1fc1de5_905b_efe7_d960_3597604fbdfe -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 df4b153e_b429_d51a_4d38_896cbcb5f010["transformCjsImport()"] df4b153e_b429_d51a_4d38_896cbcb5f010 -->|calls| 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 style 3cf1d94a_16a2_96d6_7d1d_9757e22a2557 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/server/pluginContainer.ts lines 694–702
warn(rawLog: string | RollupLog | (() => string | RollupLog)): void {
const log = this._normalizeRawLog(rawLog)
const msg = buildErrorMessage(
log,
[colors.yellow(`warning: ${log.message}`)],
false,
)
this._logger.warn(msg, { clear: true, timestamp: true })
}
Domain
Subdomains
Called By
- _createServer()
- _warnIncompatibleMethod()
- compileLightningCSS()
- importAnalysisPlugin()
- loadAndTransform()
- minifyCSS()
- onRollupLog()
- optimizeDepsDisabledBackwardCompatibility()
- resolveBuildEnvironmentOptions()
- resolveBuildOutputs()
- resolveRolldownOptions()
- resolveServerOptions()
- runConfigHook()
- runPostCSS()
- scanImports()
- transformCjsImport()
- transformMiddleware()
- warn()
Source
Frequently Asked Questions
What does warn() do?
warn() is a function in the vite codebase, defined in packages/vite/src/node/server/pluginContainer.ts.
Where is warn() defined?
warn() is defined in packages/vite/src/node/server/pluginContainer.ts at line 694.
What does warn() call?
warn() calls 3 function(s): _normalizeRawLog, buildErrorMessage, warn.
What calls warn()?
warn() is called by 18 function(s): _createServer, _warnIncompatibleMethod, compileLightningCSS, importAnalysisPlugin, loadAndTransform, minifyCSS, onRollupLog, optimizeDepsDisabledBackwardCompatibility, and 10 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free