无法解析错误:.mixinname在线上未定义

发布于 2025-02-08 08:11:42 字数 494 浏览 4 评论 0原文

当我运行.NET6.0 Web项目时,我会遇到有关未定义Mixins的许多错误。

我尝试了很多事情,但仍然无法解决此错误。

以下是有关该项目的更多信息,可以有用:

  • 所有。所有的。都带有下划线“ _”的所有文件名称统计数据。
  • 所有.LESLENE文件都将导入样式。
  • 我会用这样的混音导入文件:@import“ ../_mixins.less”;
  • 当调用Mixins时总是这样这样做:.mixin-name();
  • 在index.cshtml文件中,我与编译的CSS链接:
  • 在statup.cs中,我以这样的方式配置服务:
services.AddWebOptimizer(pipe =>
{
    pipe.AddLessBundle("/css/styles.min.css", "css/**/*.less")
        .MinifyCss();
}

when I'm running my .net6.0 web project I get numerous errors about undefined mixins.

I tried many things but still can not fix this error.

Here is some more information about the project that can be useful:

  • All .less file names stat with underscore "_".
  • All .less files are imported to styles.less file.
  • I import the file with the mixins like this: @import "../_mixins.less";
  • When calling a mixins always doing like this: .mixin-name();
  • In Index.cshtml file I have link with the compiled css:
  • In the Statup.cs I configure the service like this:
services.AddWebOptimizer(pipe =>
{
    pipe.AddLessBundle("/css/styles.min.css", "css/**/*.less")
        .MinifyCss();
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文