From 27cf4eb398fe210afaf05063e51f46da34ef66da Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Wed, 28 Jun 2017 20:38:14 +0100 Subject: [PATCH] fix: use latest API (`loader-utils`) (#61) --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 4e244ba..ad6a93e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import istanbulLibInstrument from 'istanbul-lib-instrument'; +import { createInstrumenter } from 'istanbul-lib-instrument'; import loaderUtils from 'loader-utils'; import convert from 'convert-source-map'; @@ -10,8 +10,8 @@ export default function (source, sourceMap) { srcMap = inlineSourceMap.sourcemap; } - const userOptions = loaderUtils.parseQuery(this.query); - const instrumenter = istanbulLibInstrument.createInstrumenter( + const userOptions = loaderUtils.getOptions(this); + const instrumenter = createInstrumenter( Object.assign({ produceSourceMap: this.srcMap }, userOptions), );