microsoft / license-checker-webpack-plugin

Webpack plugin that verifies licenses of all external dependencies in a compilation, and outputs them to a file.
MIT License
135 stars 28 forks source link

Support Webpack 5 method of adding an asset #28

Closed bz2 closed 3 years ago

bz2 commented 3 years ago

Fixes microsoft/license-checker-webpack-plugin#27

Changes based on dialogue in webpack/webpack#11425 between webpack and workbook-webpack-plugin devs.

Split tap and asset logic in LicenseCheckerWebpackPlugin.apply() by version of webpack. Use PROCESS_ASSETS_STAGE_ADDITIONAL for webpack 5.

Update peerDependencies to ^4.4.0 || ^5.4.0.

Have tested manually with my project using version 5.4.0 which creates the same output as the previous codepath.

ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

bz2 commented 3 years ago

@MikeDevice @unindented I've rebased on master to resolve package.json conflict, and made two other minor changes, one reverting the version of webpack-sources used as fallback, and one changing how the plugin name is assigned.

I've stuck with the explicit version check for now (I'm not sure which pieces of the tap changes landed when exactly without going over past webpack commits).

unindented commented 3 years ago

@bz2 @MikeDevice I've published v0.2.0 with these changes. Thank you so much!