Home / Function/ getStyleResources() — astro Function Reference

getStyleResources() — astro Function Reference

Architecture documentation for the getStyleResources() function in common.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e5920895_4440_a21f_b9ee_6e24b2debe58["getStyleResources()"]
  0f62fcfb_9504_86a2_16bb_d8a9742e1f23["common.ts"]
  e5920895_4440_a21f_b9ee_6e24b2debe58 -->|defined in| 0f62fcfb_9504_86a2_16bb_d8a9742e1f23
  style e5920895_4440_a21f_b9ee_6e24b2debe58 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/csp/common.ts lines 47–52

export function getStyleResources(csp: EnabledCsp): string[] {
	if (csp === true) {
		return [];
	}
	return csp.styleDirective?.resources ?? [];
}

Domain

Subdomains

Frequently Asked Questions

What does getStyleResources() do?
getStyleResources() is a function in the astro codebase, defined in packages/astro/src/core/csp/common.ts.
Where is getStyleResources() defined?
getStyleResources() is defined in packages/astro/src/core/csp/common.ts at line 47.

Analyze Your Own Codebase

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

Try Supermodel Free