Left file: appwork-v1_3_1/aspnet-mvc-starter/AspnetMvcStarter/App_Start/BundleConfig.cs  
Right file: appwork-v1_4_0/aspnet-mvc-starter/AspnetMvcStarter/App_Start/BundleConfig.cs  
using System.Web.Optimization; = using System.Web.Optimization;
using System;   using System;
using System.Collections.Generic;   using System.Collections.Generic;
using System.IO;   using System.IO;
using System.Text.RegularExpressions;   using System.Text.RegularExpressions;
using GlobExpressions;   using GlobExpressions;
using BundleTransformer.Core.Bundles;   using BundleTransformer.Core.Bundles;
using BundleTransformer.Core.Orderers;   using BundleTransformer.Core.Orderers;
using BundleTransformer.Core.Resolvers;   using BundleTransformer.Core.Resolvers;
using System.Web;   using System.Web;
     
namespace AspnetMvcStarter   namespace AspnetMvcStarter
{   {
    public class CssRewriteUrlTransformWrapper : IItemTransform       public class CssRewriteUrlTransformWrapper : IItemTransform
    {       {
        public string Process(string includedVirtualPath, string input)           public string Process(string includedVirtualPath, string input)
        {           {
            return new CssRewriteUrlTransform().Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input);               return new CssRewriteUrlTransform().Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input);
        }           }
    }       }
     
    public class BundleConfig       public class BundleConfig
    {       {
        // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862           // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)           public static void RegisterBundles(BundleCollection bundles)
        {           {
            // bundles.UseCdn = true;               // bundles.UseCdn = true;
            // BundleTable.EnableOptimizations = true;               // BundleTable.EnableOptimizations = true;
     
            // Replace a default bundle resolver in order to the debugging HTTP handler               // Replace a default bundle resolver in order to the debugging HTTP handler
            // can use transformations of the corresponding bundle               // can use transformations of the corresponding bundle
            BundleResolver.Current = new CustomBundleResolver();               BundleResolver.Current = new CustomBundleResolver();
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Application assets               // Application assets
            //               //
     
            bundles.Add(SassBundle("~/bundle/css/main").Include("~/Content/main.scss"));               bundles.Add(SassBundle("~/bundle/css/main").Include("~/Content/main.scss"));
            bundles.Add(new ScriptBundle("~/bundle/js/main").Include("~/Scripts/main.js"));               bundles.Add(new ScriptBundle("~/bundle/js/main").Include("~/Scripts/main.js"));
     
            // Bundle jquery-validation-unobtrusive package               // Bundle jquery-validation-unobtrusive package
            bundles.Add(new ScriptBundle("~/bundle/vendor/js/jquery-validation-unobtrusive/jquery-validation-unobtrusive").Include( <>             bundles.Add(new ScriptBundle("~/bundle/vendor/js/validate-unobtrusive/validate-unobtrusive").Include(
                        "~/node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js")); =                         "~/node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js"));
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Core stylesheets               // Core stylesheets
            //               //
     
            bundles.Add(SassBundle("~/bundle/vendor/css/bootstrap").Include("~/Vendor/css/bootstrap.scss"));               bundles.Add(SassBundle("~/bundle/vendor/css/bootstrap").Include("~/Vendor/css/bootstrap.scss"));
            bundles.Add(SassBundle("~/bundle/vendor/css/appwork").Include("~/Vendor/css/appwork.scss"));               bundles.Add(SassBundle("~/bundle/vendor/css/appwork").Include("~/Vendor/css/appwork.scss"));
            bundles.Add(SassBundle("~/bundle/vendor/css/theme-corporate").Include("~/Vendor/css/theme-corporate.scss"));               bundles.Add(SassBundle("~/bundle/vendor/css/theme-corporate").Include("~/Vendor/css/theme-corporate.scss"));
            bundles.Add(SassBundle("~/bundle/vendor/css/colors").Include("~/Vendor/css/colors.scss"));               bundles.Add(SassBundle("~/bundle/vendor/css/colors").Include("~/Vendor/css/colors.scss"));
            bundles.Add(SassBundle("~/bundle/vendor/css/uikit").Include("~/Vendor/css/uikit.scss"));               bundles.Add(SassBundle("~/bundle/vendor/css/uikit").Include("~/Vendor/css/uikit.scss"));
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Automatically bundle ~/Vendor/js directory               // Automatically bundle ~/Vendor/js directory
            //               //
     
            // Bundle path: ~/bundle/vendor/js/{filename}               // Bundle path: ~/bundle/vendor/js/{filename}
            foreach (string[] bundleFile in GetVendorBundles("js", "js", "**/*", "js"))               foreach (string[] bundleFile in GetVendorBundles("js", "js", "**/*", "js"))
            {               {
                bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1]));                   bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1]));
            }               }
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Automatically bundle ~/Vendor/css/pages directory               // Automatically bundle ~/Vendor/css/pages directory
            //               //
     
            // Bundle path: ~/bundle/vendor/css/pages/{filename}               // Bundle path: ~/bundle/vendor/css/pages/{filename}
            foreach (string[] bundleFile in GetVendorBundles("css\\pages", "css/pages", "**/*", "scss"))               foreach (string[] bundleFile in GetVendorBundles("css\\pages", "css/pages", "**/*", "scss"))
            {               {
                bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1]));                   bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1]));
            }               }
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Automatically bundle ~/Vendor/fonts directory               // Automatically bundle ~/Vendor/fonts directory
            //               //
     
            // Bundle path: ~/bundle/vendor/fonts/{filename}               // Bundle path: ~/bundle/vendor/fonts/{filename}
            foreach (string[] bundleFile in GetVendorBundles("fonts", "fonts", "*", "css"))               foreach (string[] bundleFile in GetVendorBundles("fonts", "fonts", "*", "css"))
            {               {
                bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1], new CssRewriteUrlTransformWrapper()));                   bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1], new CssRewriteUrlTransformWrapper()));
            }               }
     
            // ------------------------------------------------------------------------------------               // ------------------------------------------------------------------------------------
            // Automatically bundle ~/Vendor/libs directory               // Automatically bundle ~/Vendor/libs directory
            //               //
     
            // Bundle path: ~/bundle/vendor/css/{libdir}/{filename}               // Bundle path: ~/bundle/vendor/css/{libdir}/{filename}
            foreach (string[] bundleFile in GetVendorBundles("libs", "css", "**/*", "scss"))               foreach (string[] bundleFile in GetVendorBundles("libs", "css", "**/*", "scss"))
            {               {
                if (bundleFile[2] == "true")                   if (bundleFile[2] == "true")
                {                   {
                    bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1], new CssRewriteUrlTransformWrapper()));                       bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1], new CssRewriteUrlTransformWrapper()));
                }                   }
                else                   else
                {                   {
                    bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1]));                       bundles.Add(SassBundle(bundleFile[0]).Include(bundleFile[1]));
                }                   }
            }               }
     
            // Bundle path: ~/bundle/vendor/js/{libdir}/{filename}               // Bundle path: ~/bundle/vendor/js/{libdir}/{filename}
            foreach (string[] bundleFile in GetVendorBundles("libs", "js", "**/*", "js"))               foreach (string[] bundleFile in GetVendorBundles("libs", "js", "**/*", "js"))
            {               {
                bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1]));                   bundles.Add(new Bundle(bundleFile[0]).Include(bundleFile[1]));
            }               }
     
        }           }
     
        private static Bundle SassBundle(string path)           private static Bundle SassBundle(string path)
        {           {
            return new CustomStyleBundle(path)               return new CustomStyleBundle(path)
            {               {
                Orderer = new NullOrderer()                   Orderer = new NullOrderer()
            };               };
        }           }
     
        private static string[][] GetVendorBundles(string sourcePath, string bundlePath, string globPattern, string ext)           private static string[][] GetVendorBundles(string sourcePath, string bundlePath, string globPattern, string ext)
        {           {
            // Application root directory path               // Application root directory path
            string APP_PATH = AppDomain.CurrentDomain.BaseDirectory;               string APP_PATH = AppDomain.CurrentDomain.BaseDirectory;
            //               //
     
            DirectoryInfo dirInfo = new DirectoryInfo(APP_PATH + "\\Vendor\\" + sourcePath);               DirectoryInfo dirInfo = new DirectoryInfo(APP_PATH + "\\Vendor\\" + sourcePath);
            IEnumerable<FileInfo> contents = dirInfo.GlobFiles(globPattern + "." + ext);               IEnumerable<FileInfo> contents = dirInfo.GlobFiles(globPattern + "." + ext);
     
            List<string[]> bundles = new List<string[]>();               List<string[]> bundles = new List<string[]>();
     
            Regex normalizeRegex = new Regex("\\\\");               Regex normalizeRegex = new Regex("\\\\");
     
            sourcePath = normalizeRegex.Replace(sourcePath, "/") + "/";               sourcePath = normalizeRegex.Replace(sourcePath, "/") + "/";
     
            Regex pathRegex = new Regex(".*?" + Regex.Escape("/Vendor/" + sourcePath));               Regex pathRegex = new Regex(".*?" + Regex.Escape("/Vendor/" + sourcePath));
            Regex nameRegex = new Regex("\\." + Regex.Escape(ext) + "$");               Regex nameRegex = new Regex("\\." + Regex.Escape(ext) + "$");
     
            Regex urlRewriteTestRegex = new Regex("/(" +               Regex urlRewriteTestRegex = new Regex("/(" +
                    "minicolors/minicolors" + "|" +                       "minicolors/minicolors" + "|" +
                    "blueimp-gallery/gallery-video" + "|" +                       "blueimp-gallery/gallery-video" + "|" +
                    "blueimp-gallery/gallery" + "|" +                       "blueimp-gallery/gallery" + "|" +
                    "jstree/themes/default/style" + "|" +                       "jstree/themes/default/style" + "|" +
                    "jstree/themes/default-dark/style" + "|" +                       "jstree/themes/default-dark/style" + "|" +
                    "photoswipe/photoswipe" +                       "photoswipe/photoswipe" +
                ")\\.scss$");                   ")\\.scss$");
     
            foreach (FileInfo file in contents)               foreach (FileInfo file in contents)
            {               {
                string filePath = pathRegex.Replace(normalizeRegex.Replace(file.FullName, "/"), "");                   string filePath = pathRegex.Replace(normalizeRegex.Replace(file.FullName, "/"), "");
                string relativeBundlePath = "~/bundle/vendor/" + bundlePath + "/" + nameRegex.Replace(filePath, "");                   string relativeBundlePath = "~/bundle/vendor/" + bundlePath + "/" + nameRegex.Replace(filePath, "");
                string relativeSourcePath = "~/Vendor/" + sourcePath + filePath;                   string relativeSourcePath = "~/Vendor/" + sourcePath + filePath;
                bool urlRewrite = urlRewriteTestRegex.IsMatch(relativeSourcePath);                   bool urlRewrite = urlRewriteTestRegex.IsMatch(relativeSourcePath);
     
                bundles.Add(new string[] { relativeBundlePath, relativeSourcePath, urlRewrite ? "true" : "false" });                   bundles.Add(new string[] { relativeBundlePath, relativeSourcePath, urlRewrite ? "true" : "false" });
            }               }
     
            return bundles.ToArray();               return bundles.ToArray();
        }           }
     
    }       }
}   }