Is it possible to configure LESS to remove \"// comments\" when it compiles via JS?
I want to remove them from the outputted less file.
Adding the -x
option to your lessc
compile command will minify the CSS, which should strip out comments. In the event it doesn't you can get more control over the minification options by using the YUI CSS compressor by adding the --yui-compress
option to your compile command, which definitely strips out comments.
Like Raphael said in his answer //
style comments should not be present in compiled CSS anyway so your question doesn't make a lot of sense in the first place.
All of this information is clearly stated on the LESS homepage / documentation, so maybe you should just read that first.