我正在尝试将 Asp.Net 中的 scss 文件与 Bundle 方法集成:
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
附加信息:在从文件“/content/css/style.scss”中读取的 SCSS 代码转换为 CSS 代码语法错误的过程中发生了错误。
查看更多详情:
Message: Undefined mixin 'box-shadow'.
File: /content/css/covve/_colours.scss
Line number: 56
我已经下载了所有的 Sass 库。任何人都可以帮助我,我是 sass 文件的新手。先感谢您!