【问题标题】:Error compiling less stylesheet with VS 2013 Web Essentials when importing a stylesheet from different folder从不同文件夹导入样式表时,使用 VS 2013 Web Essentials 编译较少样式表时出错
【发布时间】:2014-06-19 18:13:54
【问题描述】:

我正在使用 VS 2013 更新 2,并且最近为 VS 2013 更新 2 安装了 Web Essentials。

我的 LESS 文件被分散到每个页面的多个 LESS 样式表中。我在 URL 的 @import 声明中遇到错误,例如: "~/content/fontawesome/font-awesome.less"

出错了:

/*

Compilation Error. 
See error list for details
FileError: '~/content/fontawesome/font-awesome.less' wasn't found

*/

目前看来Web Essentials不支持编译从不同文件夹导入的文件。

关于如何解决此问题的任何建议或解决方案?

【问题讨论】:

    标签: css less web-essentials


    【解决方案1】:

    在您的 @import 中省略 url() 应该可以工作。

    @import "~/content/fontawesome/font-awesome.less";
    

    Github 问题:LESS compiling doesn't seem to handle a relative path correctly #134

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-25
      • 2021-10-25
      • 2021-08-16
      • 2020-08-21
      相关资源
      最近更新 更多