license-webpack-plugin does not extract licenses of ES modules included in module concatenation (typically, in production mode).
Clone this repository, and run:
npm i
npx webpack
The license of hello-esm
, which is an ES module, will not be emitted to dist/main.licenses.txt
.
In recent versions of webpack 5, ES modules in concatenated modules have identifiers of form javascript/esm|<path>
. license-webpack-plugin does not handle identifiers of this form properly (ref: getActualFilename).
Patching license-webpack-plugin to make getActualFilename
return filename.replace(/^javascript\/esm\|/, '')
instead of filename
would be a workaround, but I'm not sure if it is a good solution.