From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/webpack/lib/LoaderTargetPlugin.js | 43 ++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'node_modules/webpack/lib/LoaderTargetPlugin.js') diff --git a/node_modules/webpack/lib/LoaderTargetPlugin.js b/node_modules/webpack/lib/LoaderTargetPlugin.js index c7f5f59b4..99ffbc997 100644 --- a/node_modules/webpack/lib/LoaderTargetPlugin.js +++ b/node_modules/webpack/lib/LoaderTargetPlugin.js @@ -1,19 +1,24 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -"use strict"; - -class LoaderTargetPlugin { - constructor(target) { - this.target = target; - } - - apply(compiler) { - compiler.plugin("compilation", (compilation) => { - compilation.plugin("normal-module-loader", (loaderContext) => loaderContext.target = this.target); - }); - } -} - -module.exports = LoaderTargetPlugin; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +class LoaderTargetPlugin { + constructor(target) { + this.target = target; + } + + apply(compiler) { + compiler.hooks.compilation.tap("LoaderTargetPlugin", compilation => { + compilation.hooks.normalModuleLoader.tap( + "LoaderTargetPlugin", + loaderContext => { + loaderContext.target = this.target; + } + ); + }); + } +} + +module.exports = LoaderTargetPlugin; -- cgit v1.2.3