node-less-chokidar
node-less-chokidar copied to clipboard
How can I compile multiple less files into one css file?
I am using below scripts to compile less files:
"build-css": "node-less-chokidar src/scenes -o src/scenes",
"watch-css": "yarn run build-css && node-less-chokidar src/scenes -o src/scenes --watch --recursive",
I will compile each less file to one css file. I wonder whether there is a way for me to compile all less files into one big css file.
@zhaoyi0113 You can solve this by importing all the other less files in a new file, and when you compile that, it will contain all the rules from every less file it imports.
Problem is that this module doesn't support "intelligent" crawling of the less file graph, so it won't detect changes in the file that imports every file. I'm thinking about an easy solution and will try to find some time to fix it. This solution only works for the build-css option.