less-loader

less loader module for webpack

npm install less-loader
6 downloads in the last day
56 downloads in the last week
230 downloads in the last month

less loader for webpack

Usage

Documentation: Using loaders

var css = require("!raw!less!./file.less");
// => returns compiled css code from file.less, resolves imports
var css = require("!css!less!./file.less");
// => returns compiled css code from file.less, resolves imports and url(...)s

Use in tandem with the style-loader to add the css rules to your document:

require("!style!css!less!./file.less");

webpack config

module.exports = {
  module: {
    loaders: [
      {
        test: /\.less$/,
        loader: "style-loader!css-loader!less-loader"
      }
    ]
  }
};

Then you only need to write: require("./file.less")

License

MIT (http://www.opensource.org/licenses/mit-license.php)

npm loves you