Home / Function/ createSandbox() — vue Function Reference

createSandbox() — vue Function Reference

Architecture documentation for the createSandbox() function in create-bundle-runner.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  673bb0ac_774b_0ff0_3bd8_c886a2909e07["createSandbox()"]
  26b57d84_121f_755e_f3cd_eb5e57e71799["createBundleRunner()"]
  26b57d84_121f_755e_f3cd_eb5e57e71799 -->|calls| 673bb0ac_774b_0ff0_3bd8_c886a2909e07
  style 673bb0ac_774b_0ff0_3bd8_c886a2909e07 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/bundle-renderer/create-bundle-runner.ts lines 8–25

function createSandbox(context?: any) {
  const sandbox = {
    Buffer,
    console,
    process,
    setTimeout,
    setInterval,
    setImmediate,
    clearTimeout,
    clearInterval,
    clearImmediate,
    __VUE_SSR_CONTEXT__: context
  }

  // @ts-expect-error
  sandbox.global = sandbox
  return sandbox
}

Subdomains

Frequently Asked Questions

What does createSandbox() do?
createSandbox() is a function in the vue codebase.
What calls createSandbox()?
createSandbox() is called by 1 function(s): createBundleRunner.

Analyze Your Own Codebase

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

Try Supermodel Free