Home / Function/ create() — astro Function Reference

create() — astro Function Reference

Architecture documentation for the create() function in pipeline.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e02623a2_d234_d3cd_6ac2_6344be8cae47["create()"]
  40ba2769_779c_63d9_4084_f451c2f62cd9["AppPipeline"]
  e02623a2_d234_d3cd_6ac2_6344be8cae47 -->|defined in| 40ba2769_779c_63d9_4084_f451c2f62cd9
  style e02623a2_d234_d3cd_6ac2_6344be8cae47 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/app/pipeline.ts lines 21–51

	static create({ manifest, streaming }: Pick<AppPipeline, 'manifest' | 'streaming'>) {
		const resolve = async function resolve(specifier: string) {
			if (!(specifier in manifest.entryModules)) {
				throw new Error(`Unable to resolve [${specifier}]`);
			}
			const bundlePath = manifest.entryModules[specifier];
			if (bundlePath.startsWith('data:') || bundlePath.length === 0) {
				return bundlePath;
			} else {
				return createAssetLink(bundlePath, manifest.base, manifest.assetsPrefix);
			}
		};
		const logger = createConsoleLogger(manifest.logLevel);
		const pipeline = new AppPipeline(
			logger,
			manifest,
			'production',
			manifest.renderers,
			resolve,
			streaming,
			undefined,
			undefined,
			undefined,
			undefined,
			undefined,
			undefined,
			undefined,
			undefined,
		);
		return pipeline;
	}

Domain

Subdomains

Frequently Asked Questions

What does create() do?
create() is a function in the astro codebase, defined in packages/astro/src/core/app/pipeline.ts.
Where is create() defined?
create() is defined in packages/astro/src/core/app/pipeline.ts at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free