From 16e7601134a88bf9f983e79fb26484a9824432d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8C=AF=E9=9C=87?= <865702942@qq.com> Date: Fri, 24 Feb 2017 21:01:51 +0800 Subject: [PATCH] fix deprecation warning (close #427) --- loader.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/loader.js b/loader.js index 4960135f..057763c2 100644 --- a/loader.js +++ b/loader.js @@ -19,7 +19,7 @@ module.exports = function(source) { module.exports.pitch = function(request) { if(this.cacheable) this.cacheable(); - var query = loaderUtils.parseQuery(this.query); + var query = loaderUtils.getOptions(this) || {}; var loaders = this.loaders.slice(this.loaderIndex + 1); this.addDependency(this.resourcePath); // We already in child compiler, return empty bundle diff --git a/package.json b/package.json index 29a4b8d5..d9e1dc24 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dependencies": { "ajv": "^4.11.2", "async": "^2.1.2", - "loader-utils": "^0.2.16", + "loader-utils": "^1.0.2", "webpack-sources": "^0.1.0" }, "devDependencies": {