Bundler忽略包含@imports的css文件

时间:2017-05-25 10:30:25

标签: css asp.net-mvc visual-studio bundle

我有一个非常恼人的问题,即发布后捆绑器没有正确加载文件all.css,导致我的日期选择器没有正确设置样式。

以下是从Visual Studio调试时的日期选择器:

enter image description here

发布申请后:

enter image description here

all.css只包含

@import "base.css";
@import "theme.css";
@import "jquery-ui.css";

bundleconfig.cs包含:

bundles.Add(new StyleBundle("~/Content/css")
    .Include("~/Content/bootstrap.css")
    .Include("~/Content/mystyles.css")
    .Include("~/Content/themes/base/all.css"));

我注意到,如果我手动添加

,问题就解决了
.Include("~/Content/themes/base/jquery-ui.css)

但这并不能解释为什么会发生这种情况。

有没有人有任何想法或建议?

谢谢!

0 个答案:

没有答案