Dela via


RazorComponentsEndpointConventionBuilderExtensions.WithStaticAssets Method

Definition

Sets a ResourceAssetCollection and ImportMapDefinition metadata for the component application.

public static Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder WithStaticAssets (this Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder builder, string? manifestPath = default);
static member WithStaticAssets : Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder * string -> Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder
<Extension()>
Public Function WithStaticAssets (builder As RazorComponentsEndpointConventionBuilder, Optional manifestPath As String = Nothing) As RazorComponentsEndpointConventionBuilder

Parameters

manifestPath
String

The manifest associated with the assets.

Returns

The RazorComponentsEndpointConventionBuilder.

Remarks

The manifestPath must match the path of the manifes file provided to the MapStaticAssets(IEndpointRouteBuilder, String) call.

Applies to