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/ExternalsPlugin.js | 44 +++++++++++++++-------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'node_modules/webpack/lib/ExternalsPlugin.js') diff --git a/node_modules/webpack/lib/ExternalsPlugin.js b/node_modules/webpack/lib/ExternalsPlugin.js index 24cc3ad3a..697f1aaa0 100644 --- a/node_modules/webpack/lib/ExternalsPlugin.js +++ b/node_modules/webpack/lib/ExternalsPlugin.js @@ -1,21 +1,23 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -"use strict"; - -const ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin"); - -class ExternalsPlugin { - constructor(type, externals) { - this.type = type; - this.externals = externals; - } - apply(compiler) { - compiler.plugin("compile", (params) => { - params.normalModuleFactory.apply(new ExternalModuleFactoryPlugin(this.type, this.externals)); - }); - } -} - -module.exports = ExternalsPlugin; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin"); + +class ExternalsPlugin { + constructor(type, externals) { + this.type = type; + this.externals = externals; + } + apply(compiler) { + compiler.hooks.compile.tap("ExternalsPlugin", ({ normalModuleFactory }) => { + new ExternalModuleFactoryPlugin(this.type, this.externals).apply( + normalModuleFactory + ); + }); + } +} + +module.exports = ExternalsPlugin; -- cgit v1.2.3