导入.less文件被编译成单个.css文件

时间:2022-10-08 19:49:02

I am importing several .less files into styles.less file like following

我将几个.less文件导入styles.less文件,如下所示

@import "foo1";
@import "foo2";
@import "foo3";
@import "foo4";

Now when I compile styles.less file it merge all .less files into styles.css. This approach is good when I want to deploy it to production but I want to compile all .less files separately so that I could easily debug in my chrome dev tools in dev environment. How can I compile them in this way?

现在,当我编译styles.less文件时,它将所有.less文件合并到styles.css中。当我想将它部署到生产中时,这种方法很好,但我想分别编译所有.less文件,以便我可以在dev环境中轻松调试我的chrome dev工具。我怎样才能以这种方式编译它们?

1 个解决方案

#1


0  

Compile the .less files separately. Then link all of them on the HTML page.

分别编译.less文件。然后在HTML页面上链接所有这些内容。

#1


0  

Compile the .less files separately. Then link all of them on the HTML page.

分别编译.less文件。然后在HTML页面上链接所有这些内容。