无法解析错误:.mixinname在线上未定义
当我运行.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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论