FunctionModulePlugin.js 463 B

12345678910111213141516171819
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const FunctionModuleTemplatePlugin = require("./FunctionModuleTemplatePlugin");
  7. class FunctionModulePlugin {
  8. apply(compiler) {
  9. compiler.hooks.compilation.tap("FunctionModulePlugin", compilation => {
  10. new FunctionModuleTemplatePlugin().apply(
  11. compilation.moduleTemplates.javascript
  12. );
  13. });
  14. }
  15. }
  16. module.exports = FunctionModulePlugin;