css-loader 0.28.3 → 0.28.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="0.28.4"></a>
6
+ ## [0.28.4](https://github.com/webpack/css-loader/compare/v0.28.3...v0.28.4) (2017-05-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * preserve leading underscore in class names ([#543](https://github.com/webpack/css-loader/issues/543)) ([f6673c8](https://github.com/webpack/css-loader/commit/f6673c8))
12
+
13
+
14
+
5
15
  <a name="0.28.3"></a>
6
16
  ## [0.28.3](https://github.com/webpack/css-loader/compare/v0.28.2...v0.28.3) (2017-05-25)
7
17
 
package/lib/processCss.js CHANGED
@@ -9,6 +9,7 @@ var loaderUtils = require("loader-utils");
9
9
  var assign = require("object-assign");
10
10
  var getLocalIdent = require("./getLocalIdent");
11
11
 
12
+ var icssUtils = require('icss-utils');
12
13
  var localByDefault = require("postcss-modules-local-by-default");
13
14
  var extractImports = require("postcss-modules-extract-imports");
14
15
  var modulesScope = require("postcss-modules-scope");
@@ -65,24 +66,17 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
65
66
  });
66
67
  }
67
68
 
68
- css.walkRules(function(rule) {
69
- if(rule.selector === ":export") {
70
- rule.walkDecls(function(decl) {
71
- exports[decl.prop] = decl.value;
72
- });
73
- rule.remove();
74
- } else if(/^:import\(.+\)$/.test(rule.selector)) {
75
- var match = /^:import\((.+)\)$/.exec(rule.selector);
76
- var url = loaderUtils.parseString(match[1]);
77
- rule.walkDecls(function(decl) {
78
- imports["$" + decl.prop] = importItems.length;
79
- importItems.push({
80
- url: url,
81
- export: decl.value
82
- });
69
+ var icss = icssUtils.extractICSS(css);
70
+ exports = icss.icssExports;
71
+ Object.keys(icss.icssImports).forEach(function(key) {
72
+ var url = loaderUtils.parseString(key);
73
+ Object.keys(icss.icssImports[key]).forEach(function(prop) {
74
+ imports["$" + prop] = importItems.length;
75
+ importItems.push({
76
+ url: url,
77
+ export: icss.icssImports[key][prop]
83
78
  });
84
- rule.remove();
85
- }
79
+ })
86
80
  });
87
81
 
88
82
  Object.keys(exports).forEach(function(exportName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "css-loader",
3
- "version": "0.28.3",
3
+ "version": "0.28.4",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "css loader module for webpack",
6
6
  "engines": {
@@ -15,6 +15,7 @@
15
15
  "babel-code-frame": "^6.11.0",
16
16
  "css-selector-tokenizer": "^0.7.0",
17
17
  "cssnano": ">=2.6.1 <4",
18
+ "icss-utils": "^2.1.0",
18
19
  "loader-utils": "^1.0.2",
19
20
  "lodash.camelcase": "^4.3.0",
20
21
  "object-assign": "^4.0.1",