Skip to content

Commit 0b45584

Browse files
committed
change query to ?modules
1 parent 0d366a6 commit 0b45584

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,13 @@ You can configure the generated ident with the `localIdentName` query parameter
110110

111111
Note: For prerendering with extract-text-webpack-plugin you should use `css-loader/locals` instead of `style-loader!css-loader` **in the prerendering bundle**. It doesn't embed CSS but only exports the identifier mappings.
112112

113-
### Module mode
114-
115-
(experimental)
113+
### CSS Modules
116114

117115
See [CSS Modules](https://github.com/css-modules/css-modules).
118116

119-
The query parameter `module` enables **CSS Module** mode. (`css-loader?module`)
117+
The query parameter `modules` enables the **CSS Modules** spec. (`css-loader?modules`)
120118

121-
This enables Local scoped CSS by default. (You can leave it with `:global(...)` or `:global` for selectors and/or rules.)
119+
This enables Local scoped CSS by default. (You can switch it off with `:global(...)` or `:global` for selectors and/or rules.)
122120

123121
### Composing CSS classes
124122

lib/loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = function(content, map) {
1212
if(this.cacheable) this.cacheable();
1313
var query = loaderUtils.parseQuery(this.query);
1414
var root = query.root;
15-
var moduleMode = query.module;
15+
var moduleMode = query.modules || query.module;
1616

1717
if(typeof map !== "string") {
1818
map = JSON.stringify(map);

lib/localsLoader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var getImportPrefix = require("./getImportPrefix");
1010
module.exports = function(content) {
1111
if(this.cacheable) this.cacheable();
1212
var query = loaderUtils.parseQuery(this.query);
13-
var moduleMode = query.module;
13+
var moduleMode = query.modules || query.module;
1414

1515
var result = processCss(content, null, {
1616
mode: moduleMode ? "local" : "global",

0 commit comments

Comments
 (0)