Skip to content

Commit

Permalink
Merge pull request #41 from ZeroXitreo/master
Browse files Browse the repository at this point in the history
Add support for searchPatterns (Conveniently solve issue #16)
[release]
  • Loading branch information
madskristensen authored Jan 20, 2022
2 parents 70a94cc + 0a3c352 commit babd7be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ private string GenerateCacheKey(HttpContext context, IAssetContext config)
context.Request.PathBase);
}

foreach (var route in config.Asset.SourceFiles.Where(f => f.EndsWith(".scss")).Select(f => f.TrimStart('/')))
IEnumerable<string> routes = config.Asset.SourceFiles.Where(f => f.EndsWith(".scss"));
if (config.Asset.Items?.ContainsKey("PhysicalFiles") ?? false)
{
routes = (IEnumerable<string>)config.Asset.Items["PhysicalFiles"];
}

foreach (var route in routes.Select(f => f.TrimStart('/')))
{
IFileInfo file = fileProvider.GetFileInfo(route);
var basePath = GetBasePath(route);
Expand Down

0 comments on commit babd7be

Please sign in to comment.