Created
April 21, 2019 08:38
-
-
Save Balder1840/182c66bfbe62db2ad86be640776a9370 to your computer and use it in GitHub Desktop.
CssRewriteUrlTransform for mvc bundle with virtual path when deployed in IIS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
namespace XXX.Web | |
{ | |
public class CssRewriteUrlTransformFixed : IItemTransform | |
{ | |
public string Process(string includedVirtualPath, string input) | |
{ | |
return new CssRewriteUrlTransform().Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment