Closed imraymondlee closed 4 years ago
Hello, Raymond!
In my case, there are no such problems in either release mode or debug mode.
Show me the code of your BundleConfig.cs
file.
Hi Taritsyn,
Here is my BundleConfig.cs
using BundleTransformer.Core.Bundles;
using BundleTransformer.Core.Orderers;
using BundleTransformer.Core.Resolvers;
using System.Web;
using System.Web.Optimization;
namespace SassTest
{
public class BundleConfig
{
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
BundleResolver.Current = new CustomBundleResolver();
var nullBuilder = new NullBuilder();
var nullOrderer = new NullOrderer();
var sassStyleBundle = new CustomStyleBundle("~/dist/main");
sassStyleBundle.Include(
"~/Content/main.scss"
);
sassStyleBundle.Orderer = nullOrderer;
bundles.Add(sassStyleBundle);
}
}
}
Everything should work. Try to reproduce this error as a demo project and send me a link to it.
I've created a new project, but could not seem to replicate the issue. Seems like it was something to do with the project itself. Thanks for your help!
I have a main
.scss
file calledmain.scss
that contains multiple other.scss
files using@import
. I'm using BundleTransformer with the SassAndScssTranslator in my BundleConfig to compile and bundlemain.scss
file, which is working great as it automatically compiles the file when I save. The issue I am facing is that it only automatically compiles when I save themain.scss
file and not when I save files that I have imported intomain.scss
. I can't seem to figure out what is causing this issue.