Home / Function/ ssrTransformJSON() — vite Function Reference

ssrTransformJSON() — vite Function Reference

Architecture documentation for the ssrTransformJSON() function in ssrTransform.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  b74365bc_9f2b_f299_c9c3_6930e35a078c["ssrTransformJSON()"]
  20c20aaf_ad5b_4014_72b5_c8262a2b5be1["ssrTransform.ts"]
  b74365bc_9f2b_f299_c9c3_6930e35a078c -->|defined in| 20c20aaf_ad5b_4014_72b5_c8262a2b5be1
  1ee4af98_1554_7714_4370_05ac2b2589cd["ssrTransform()"]
  1ee4af98_1554_7714_4370_05ac2b2589cd -->|calls| b74365bc_9f2b_f299_c9c3_6930e35a078c
  style b74365bc_9f2b_f299_c9c3_6930e35a078c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/ssr/ssrTransform.ts lines 69–80

async function ssrTransformJSON(
  code: string,
  inMap: SourceMap | { mappings: '' } | null,
): Promise<TransformResult> {
  return {
    code: code.replace('export default', `${ssrModuleExportsKey}.default =`),
    map: inMap,
    deps: [],
    dynamicDeps: [],
    ssr: true,
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does ssrTransformJSON() do?
ssrTransformJSON() is a function in the vite codebase, defined in packages/vite/src/node/ssr/ssrTransform.ts.
Where is ssrTransformJSON() defined?
ssrTransformJSON() is defined in packages/vite/src/node/ssr/ssrTransform.ts at line 69.
What calls ssrTransformJSON()?
ssrTransformJSON() is called by 1 function(s): ssrTransform.

Analyze Your Own Codebase

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

Try Supermodel Free