Skip to content

Commit 7732614

Browse files
authored
Merge pull request webpack-contrib#428 from helloyou2012/master
fix deprecation warning (loader-utils)
2 parents 7c45e94 + f8cdaca commit 7732614

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var compileExports = require("./compile-exports");
1212
module.exports = function(content, map) {
1313
if(this.cacheable) this.cacheable();
1414
var callback = this.async();
15-
var query = loaderUtils.parseQuery(this.query);
15+
var query = loaderUtils.getOptions(this) || {};
1616
var root = query.root;
1717
var moduleMode = query.modules || query.module;
1818
var camelCaseKeys = query.camelCase || query.camelcase;

lib/localsLoader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var compileExports = require("./compile-exports");
1111
module.exports = function(content) {
1212
if(this.cacheable) this.cacheable();
1313
var callback = this.async();
14-
var query = loaderUtils.parseQuery(this.query);
14+
var query = loaderUtils.getOptions(this) || {};
1515
var moduleMode = query.modules || query.module;
1616
var camelCaseKeys = query.camelCase || query.camelcase;
1717

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"babel-code-frame": "^6.11.0",
1212
"css-selector-tokenizer": "^0.7.0",
1313
"cssnano": ">=2.6.1 <4",
14-
"loader-utils": "~0.2.2",
14+
"loader-utils": "^1.0.2",
1515
"lodash.camelcase": "^4.3.0",
1616
"object-assign": "^4.0.1",
1717
"postcss": "^5.0.6",

0 commit comments

Comments
 (0)