diff --git a/src/StaticWebAssetsSdk/Tasks/UpdatePackageStaticWebAssets.cs b/src/StaticWebAssetsSdk/Tasks/UpdatePackageStaticWebAssets.cs index eb4f727d79a6..fcac8d28126e 100644 --- a/src/StaticWebAssetsSdk/Tasks/UpdatePackageStaticWebAssets.cs +++ b/src/StaticWebAssetsSdk/Tasks/UpdatePackageStaticWebAssets.cs @@ -137,7 +137,8 @@ private void RemapEndpoints(Dictionary assetMapping) var oldIdentity = asset.Identity; var fxDir = Path.Combine(IntermediateOutputPath, "fx", originalSourceId); - var destPath = Path.Combine(fxDir, StaticWebAsset.Normalize(relativePath)); + var fileSystemRelativePath = asset.ComputePathWithoutTokens(relativePath); + var destPath = Path.Combine(fxDir, StaticWebAsset.Normalize(fileSystemRelativePath)); destPath = Path.GetFullPath(destPath); var sourceFile = asset.Identity;