Less 减:未识别输入“@“进口…”;

Less 减:未识别输入“@“进口…”;,less,gruntjs,grunt-contrib-less,Less,Gruntjs,Grunt Contrib Less,我有一个非常简单的文件,现在只导入引导。我正在使用grunt和grunt contrib-less@0.9.0在保存时编译较少的文件(less@1.6.3) 我的文件如下所示: @charset "utf-8"; /** * This is the root style file for the app * to include styles in your html, you only need to include either: * dist/styles.dev.css (for

我有一个非常简单的文件,现在只导入引导。我正在使用
grunt
grunt contrib-less@0.9.0
在保存时编译较少的文件(
less@1.6.3

我的文件如下所示:

@charset "utf-8";
/**
 * This is the root style file for the app
 * to include styles in your html, you only need to include either:
 *  dist/styles.dev.css (for development)
 *  dist/styles.css (for production)
 */

// Libraries
@import "../lib/bootstrap/less/bootstrap"

// Our own files
每当我尝试运行
less:dev
任务时,就会出现以下错误

Running "less:dev" (less) task
>> ParseError: Unrecognised input in style/styles.less on line 10, column 1:
>> 9 // Libraries
>> 10 @import "../lib/bootstrap/less/bootstrap"
>> 11
我尝试从文件中删除除导入行以外的所有内容,但仍然失败,因此
@import
指令出现了一些奇怪的情况


有什么想法吗?

@import

@import "../lib/bootstrap/less/bootstrap";

哎呀。好地方。LESS没有这么说,而似乎对“@”这个角色很挑剔,这有点让人恼火。