diff --git a/lib/loader.js b/lib/loader.js index 7b98ef2..3117b68 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -16,7 +16,7 @@ module.exports = function loader(content) { const done = this.async(); const loaderContext = this; - const { resourcePath, rootContext, loaderIndex } = loaderContext; + const { resourcePath, loaderIndex } = loaderContext; // webpack 1 compat const resourceQuery = loaderContext.resourceQuery || ''; const compiler = loaderContext._compiler; @@ -74,7 +74,7 @@ module.exports = function loader(content) { } svgCompiler.addSymbol({ id, content, path: resourcePath + resourceQuery }) .then((symbol) => { - const runtime = runtimeGenerator({ symbol, config, context: rootContext, loaderContext }); + const runtime = runtimeGenerator({ symbol, config, context: loaderContext.context, loaderContext }); done(null, runtime); }).catch(done); };