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
  d4972728_db14_7121_4a40_00382560e05e["createSandbox()"]
  869be535_8c3a_65b4_18ae_17f1ba134e94["createBundleRunner()"]
  869be535_8c3a_65b4_18ae_17f1ba134e94 -->|calls| d4972728_db14_7121_4a40_00382560e05e
  style d4972728_db14_7121_4a40_00382560e05e 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