Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less-loader

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-loader - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

2

index.js

@@ -24,3 +24,3 @@ /*

};
var context = currentFileInfo.currentDirectory;
var context = currentFileInfo.currentDirectory.replace(/[\\\/]$/, "");
var moduleName = urlToRequire(file)

@@ -27,0 +27,0 @@ if(cb) {

{
"name": "less-loader",
"version": "0.6.1",
"version": "0.6.2",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "less loader module for webpack",

@@ -6,11 +6,33 @@ # less loader for webpack

``` javascript
var css = require("less!./file.less");
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
```
Don't forget to polyfill `require` if you want to use it in node.
See `webpack` documentation.
Use in tandem with the [`style-loader`](https://github.com/webpack/style-loader) to add the css rules to your document:
``` javascript
require("!style!css!less!./file.less");
```
### webpack config
``` javascript
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)
MIT (http://www.opensource.org/licenses/mit-license.php)

@@ -0,0 +0,0 @@ /*

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc