/// <summary> /// Gets a html link tag for the specified asset. /// </summary> /// <param name="bundle">The name of the Webpack bundle.</param> /// <param name="fallbackBundle">The name of the bundle to fallback to if main bundle does not exist.</param> /// <returns>An HtmlString containing the html link tag.</returns> public async Task <HtmlString> GetLinkTagAsync(string bundle, string?fallbackBundle = null) { if (string.IsNullOrEmpty(bundle)) { return(HtmlString.Empty); } bundle = TryFixCssBundleName(bundle); var file = await _manifestService.GetFromManifestAsync(bundle).ConfigureAwait(false); if (file == null) { if (string.IsNullOrEmpty(fallbackBundle)) { return(HtmlString.Empty); } fallbackBundle = TryFixCssBundleName(fallbackBundle); file = await _manifestService.GetFromManifestAsync(fallbackBundle).ConfigureAwait(false); } return(file != null ? new HtmlString(_tagBuilder.BuildLinkTag(file)) : HtmlString.Empty); }