UNPKG

generate-license-file-webpack-plugin

Version:

Webpack plugin to generate a text file asset containing all of the licenses for your production third-party dependencies.

20 lines 882 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LicenseFilePlugin = void 0; const compilationTapFactory_1 = require("./compilationTapFactory"); const defaultOptions_1 = require("./defaultOptions"); /** * Webpack plugin to generate a text file asset containing all of the licenses for your production third-party dependencies. */ class LicenseFilePlugin { constructor(options) { this.pluginName = LicenseFilePlugin.name; this.options = Object.assign(Object.assign({}, defaultOptions_1.defaultOptions), options); } apply(compiler) { const compilationTap = (0, compilationTapFactory_1.compilationTapFactory)(this.options, compiler); compiler.hooks.thisCompilation.tap(this.pluginName, compilationTap); } } exports.LicenseFilePlugin = LicenseFilePlugin; //# sourceMappingURL=licenseFilePlugin.js.map