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.

19 lines 914 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compilationTapFactory = void 0; const webpack_1 = require("webpack"); const asyncProcessAssetTapFactory_1 = require("./asyncProcessAssetTapFactory"); const licenseFilePlugin_1 = require("./licenseFilePlugin"); const compilationTapFactory = (options, compiler) => { const pluginName = licenseFilePlugin_1.LicenseFilePlugin.name; return compilation => { const processAssetTap = (0, asyncProcessAssetTapFactory_1.asyncProcessAssetTapFactory)(options, compiler, compilation); const assetOptions = { name: pluginName, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, }; compilation.hooks.processAssets.tapAsync(assetOptions, processAssetTap); }; }; exports.compilationTapFactory = compilationTapFactory; //# sourceMappingURL=compilationTapFactory.js.map