Home / Function/ renderScripts() — vue Function Reference

renderScripts() — vue Function Reference

Architecture documentation for the renderScripts() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  d6d15699_35ef_8f3d_355a_501bf0e3ca26["renderScripts()"]
  31cd301c_a88b_c811_2866_b3d6f4b7a004["render()"]
  31cd301c_a88b_c811_2866_b3d6f4b7a004 -->|calls| d6d15699_35ef_8f3d_355a_501bf0e3ca26
  e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9["_flush()"]
  e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9 -->|calls| d6d15699_35ef_8f3d_355a_501bf0e3ca26
  743c1806_91a0_c6ef_e229_47229b4099b4["getUsedAsyncFiles()"]
  d6d15699_35ef_8f3d_355a_501bf0e3ca26 -->|calls| 743c1806_91a0_c6ef_e229_47229b4099b4
  c60175e8_5fa0_a5d3_a8fa_3131903e5f77["isJS()"]
  d6d15699_35ef_8f3d_355a_501bf0e3ca26 -->|calls| c60175e8_5fa0_a5d3_a8fa_3131903e5f77
  style d6d15699_35ef_8f3d_355a_501bf0e3ca26 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/template-renderer/index.ts lines 243–258

  renderScripts(context: Object): string {
    if (this.clientManifest) {
      const initial = this.preloadFiles.filter(({ file }) => isJS(file))
      const async = (this.getUsedAsyncFiles(context) || []).filter(({ file }) =>
        isJS(file)
      )
      const needed = [initial[0]].concat(async, initial.slice(1))
      return needed
        .map(({ file }) => {
          return `<script src="${this.publicPath}${file}" defer></script>`
        })
        .join('')
    } else {
      return ''
    }
  }

Subdomains

Called By

Frequently Asked Questions

What does renderScripts() do?
renderScripts() is a function in the vue codebase.
What does renderScripts() call?
renderScripts() calls 2 function(s): getUsedAsyncFiles, isJS.
What calls renderScripts()?
renderScripts() is called by 2 function(s): _flush, render.

Analyze Your Own Codebase

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

Try Supermodel Free