less-loader
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -0,0 +0,0 @@ Changelog |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "less-loader", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "less loader module for webpack", |
@@ -54,3 +54,3 @@ # less loader for webpack | ||
See the [LESS documentation](http://lesscss.org/usage/#command-line-usage-options) for all available options. LESS translates dash-case to camelCase. | ||
See the [LESS documentation](http://lesscss.org/usage/#command-line-usage-options) for all available options. LESS translates dash-case to camelCase. Certain options which take values (e.g. `lessc --modify-var="a=b"`) are better handled with the [JSON loader syntax](http://webpack.github.io/docs/using-loaders.html#query-parameters) (`style!css!less?{"modifyVars":{"a":"b"}}`). | ||
@@ -61,3 +61,3 @@ ### LESS plugins | ||
the `lessLoader.lessPlugins` option. You can also change the options key | ||
with a query parameter: `"style!css!less?config=lessLoaderCustom"`. | ||
with a query parameter: `"less?config=lessLoaderCustom"`. | ||
@@ -68,15 +68,14 @@ ``` javascript | ||
module.exports = { | ||
module: { | ||
loaders: [...] | ||
}, | ||
lessLoader: | ||
... | ||
lessLoader: { | ||
lessPlugins: [ | ||
new LessPluginCleanCSS({advanced: true}) | ||
] | ||
} | ||
}; | ||
``` | ||
## Note on imports | ||
## Imports | ||
webpack provides an [advanced mechanism to resolve files](http://webpack.github.io/docs/resolving.html). The less-loader stubs less' `fileLoader` and passes all queries to the webpack resolving engine. Thus you can import your less-modules from `node_modules` or `bower_components`. Just prepend them with a `~` which tells webpack to look-up the [`modulesDirectories`](http://webpack.github.io/docs/configuration.html#resolve-modulesdirectories) | ||
webpack provides an [advanced mechanism to resolve files](http://webpack.github.io/docs/resolving.html). The less-loader stubs less' `fileLoader` and passes all queries to the webpack resolving engine. Thus you can import your less-modules from `node_modules`. Just prepend them with a `~` which tells webpack to look-up the [`modulesDirectories`](http://webpack.github.io/docs/configuration.html#resolve-modulesdirectories) | ||
@@ -87,14 +86,4 @@ ```css | ||
It's important to only prepend it with `~`, because `~/` resolves to the home-directory. webpack needs to distinguish `bootstrap` from `~bootstrap` because css- and less-files have no special syntax for importing relative files: | ||
It's important to only prepend it with `~`, because `~/` resolves to the home-directory. webpack needs to distinguish between `bootstrap` and `~bootstrap` because css- and less-files have no special syntax for importing relative files. Writing `@import "file"` is the same as `@import "./file";` | ||
```css | ||
@import "file"; | ||
``` | ||
is the same as | ||
```css | ||
@import "./file"; | ||
``` | ||
## Source maps | ||
@@ -101,0 +90,0 @@ |
@@ -0,0 +0,0 @@ /* |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16027
10
130