Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

iorate/license-webpack-plugin-concatenated-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license-webpack-plugin-concatenated-esm

Problem

license-webpack-plugin does not extract licenses of ES modules included in module concatenation (typically, in production mode).

Reproduction

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.

Reason

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).

Workaround

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published