12345678910111213141516171819202122232425262728293031323334353637 |
- "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;
|