Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddViteApp

Method
📦 Aspire.Hosting.JavaScript v17.0.0
func (DistributedApplicationBuilder) AddViteApp(
name string,
appDirectory string,
options ...*AddViteAppOptions,
) ViteAppResource

Signature

methodAddViteAppbuilder
Adds a Vite app to the distributed application builder.
AddViteApp(
name string,
appDirectory string,
options ...*AddViteAppOptions,
) ViteAppResource
namestringThe name of the Vite app.
appDirectorystringThe path to the directory containing the Vite app.
options...*AddViteAppOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddViteAppOptions argument.

RunScriptName*stringThe name of the script that runs the Vite app. Defaults to "dev".
ViteAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder