我正在尝试使用Bundle方法将Asp.Net中的scss文件集成:
public static void RegisterBundles(BundleCollection bundles) {
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include("~/Scripts/modernizr-*"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/css/bootstrap.css","~/Content/css/Site.css"));
var sassBundle = new Bundle("~/content/style-bundle").Include(
"~/content/css/style.scss" );
sassBundle.Transforms.Add(new BundleTransformer.Core.Transformers.CssTransformer());
sassBundle.Transforms.Add(new CssMinify());
sassBundle.Orderer = new BundleTransformer.Core.Orderers.NullOrderer();
bundles.Add(sassBundle);
}
}
我收到以下错误:
An exception of type 'BundleTransformer.Core.Translators.AssetTranslationException' occurred in BundleTransformer.SassAndScss.dll but was not handled in user code
其他信息:在翻译SCSS代码期间,从文件'/content/css/style.scss'重新编译,到CSS代码语法错误已经发生。
查看更多详情:
Message: Undefined mixin 'box-shadow'.
File: /content/css/covve/_colours.scss
Line number: 56
我已经下载了所有的Sass lib.Can任何人都可以帮助我,我是sass文件的新手。 先感谢您!