diff --git a/index.js b/index.js index 584d278..7a47eb7 100644 --- a/index.js +++ b/index.js @@ -20,11 +20,11 @@ var regexSequences = [ [/\> \<"] // remove whitespace between tags ]; -function getExtractedSVG(svgStr, query) { +function getExtractedSVG(svgStr, options) { var config; // interpolate hashes in classPrefix - if(!!query) { - config = assign({}, query); + if(!!options) { + config = assign({}, options); if (!!config.classPrefix) { const name = config.classPrefix === true ? '__[hash:base64:7]__' : config.classPrefix; @@ -60,9 +60,9 @@ function SVGInlineLoader(content) { this.cacheable && this.cacheable(); this.value = content; // Configuration - var query = loaderUtils.parseQuery(this.query); + var options = loaderUtils.getOptions(this); - return "module.exports = " + JSON.stringify(getExtractedSVG(content, query)); + return "module.exports = " + JSON.stringify(getExtractedSVG(content, options)); } SVGInlineLoader.getExtractedSVG = getExtractedSVG; diff --git a/package.json b/package.json index d6771dc..8009ebd 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "release": "standard-version" }, "dependencies": { - "loader-utils": "^0.2.11", + "loader-utils": "^1.1.0", "object-assign": "^4.0.1", "simple-html-tokenizer": "^0.1.1" },