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
  2fa07d30_80b5_9681_25e1_2ba7f1b44d6f["createSandbox()"]
  e99f1014_4151_d755_aee1_9fb410ccbf8a["create-bundle-runner.ts"]
  2fa07d30_80b5_9681_25e1_2ba7f1b44d6f -->|defined in| e99f1014_4151_d755_aee1_9fb410ccbf8a
  6a9fa059_9fc3_cee8_cd4d_4e2ad5f3f96e["createBundleRunner()"]
  6a9fa059_9fc3_cee8_cd4d_4e2ad5f3f96e -->|calls| 2fa07d30_80b5_9681_25e1_2ba7f1b44d6f
  style 2fa07d30_80b5_9681_25e1_2ba7f1b44d6f 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, defined in packages/server-renderer/src/bundle-renderer/create-bundle-runner.ts.
Where is createSandbox() defined?
createSandbox() is defined in packages/server-renderer/src/bundle-renderer/create-bundle-runner.ts at line 8.
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