Home / Function/ stringifyForDefine() — astro Function Reference

stringifyForDefine() — astro Function Reference

Architecture documentation for the stringifyForDefine() function in create-vite.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  1f6051ba_36ec_90fe_d715_13d70976bc15["stringifyForDefine()"]
  60b1393e_9046_7d4d_1df5_b46cd58358d1["create-vite.ts"]
  1f6051ba_36ec_90fe_d715_13d70976bc15 -->|defined in| 60b1393e_9046_7d4d_1df5_b46cd58358d1
  156b640b_04f8_ebda_901f_2b1e9a0418aa["createVite()"]
  156b640b_04f8_ebda_901f_2b1e9a0418aa -->|calls| 1f6051ba_36ec_90fe_d715_13d70976bc15
  style 1f6051ba_36ec_90fe_d715_13d70976bc15 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/create-vite.ts lines 331–333

function stringifyForDefine(value: string | undefined | object): string {
	return typeof value === 'string' || isObject(value) ? JSON.stringify(value) : 'undefined';
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does stringifyForDefine() do?
stringifyForDefine() is a function in the astro codebase, defined in packages/astro/src/core/create-vite.ts.
Where is stringifyForDefine() defined?
stringifyForDefine() is defined in packages/astro/src/core/create-vite.ts at line 331.
What calls stringifyForDefine()?
stringifyForDefine() is called by 1 function(s): createVite.

Analyze Your Own Codebase

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

Try Supermodel Free