From d322ccc8fac10472195b4faba90ce4e8693c8afe Mon Sep 17 00:00:00 2001 From: David Archibald Date: Wed, 4 Nov 2020 15:19:18 -0800 Subject: [PATCH] Fix parseQuery deprecation --- index.js | 6 +++--- package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index ae672c3..f909379 100644 --- a/index.js +++ b/index.js @@ -4,13 +4,13 @@ var nativejsx = require('nativejsx'); module.exports = function(source) { this.cacheable && this.cacheable(true); - var query = loaderUtils.parseQuery(this.query); + var options = loaderUtils.getOptions(this); var tree = []; - if (query && (query.prototypes !== 'inline') && (query.prototypes !== 'module')) { + if (options && (options.prototypes !== 'inline') && (options.prototypes !== 'module')) { tree.push("require('nativejsx/dist/nativejsx-prototypes.js');"); } - tree.push(nativejsx.transpile(source, query)); + tree.push(nativejsx.transpile(source, options)); return tree.join('\n'); }; diff --git a/package.json b/package.json index eda552f..864eb3d 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "author": "Trey Cordova", "license": "MIT", "dependencies": { - "nativejsx": "^4.0.0", - "loader-utils": "^0.2.12" + "loader-utils": "^2.0.0", + "nativejsx": "^4.0.0" }, "devDependencies": { "chai": "^3.4.1",