Home / Function/ warnOnce() — vue Function Reference

warnOnce() — vue Function Reference

Architecture documentation for the warnOnce() function in warn.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  ff0dbb26_906d_c579_81e5_ceadaf4a13fe["warnOnce()"]
  16b5f9ed_1e09_eff8_5797_7cb90fc86d37["compileScript()"]
  16b5f9ed_1e09_eff8_5797_7cb90fc86d37 -->|calls| ff0dbb26_906d_c579_81e5_ceadaf4a13fe
  93ccdc63_5b5b_b564_6ab2_8156ecc9fc95["warn()"]
  ff0dbb26_906d_c579_81e5_ceadaf4a13fe -->|calls| 93ccdc63_5b5b_b564_6ab2_8156ecc9fc95
  style ff0dbb26_906d_c579_81e5_ceadaf4a13fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/warn.ts lines 3–10

export function warnOnce(msg: string) {
  const isNodeProd =
    typeof process !== 'undefined' && process.env.NODE_ENV === 'production'
  if (!isNodeProd && !hasWarned[msg]) {
    hasWarned[msg] = true
    warn(msg)
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does warnOnce() do?
warnOnce() is a function in the vue codebase.
What does warnOnce() call?
warnOnce() calls 1 function(s): warn.
What calls warnOnce()?
warnOnce() is called by 1 function(s): compileScript.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free