123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- "use strict";
- const EnableLibraryPlugin = require("./library/EnableLibraryPlugin");
- class LibraryTemplatePlugin {
-
- constructor(name, target, umdNamedDefine, auxiliaryComment, exportProperty) {
- this.library = {
- type: target || "var",
- name,
- umdNamedDefine,
- auxiliaryComment,
- export: exportProperty
- };
- }
-
- apply(compiler) {
- const { output } = compiler.options;
- output.library = this.library;
- new EnableLibraryPlugin(this.library.type).apply(compiler);
- }
- }
- module.exports = LibraryTemplatePlugin;
|