Skip to content

[Bug]: Incompatibility with webpack-license-plugin #8924

@Robot-Inventor

Description

@Robot-Inventor

System Info

  System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900KF
    Memory: 56.92 GB / 95.85 GB
  Binaries:
    Node: 23.5.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.6 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 8.15.4 - ~\AppData\Roaming\npm\pnpm.CMD
    bun: 1.1.2 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rspack/cli: ^1.1.8 => 1.1.8
    @rspack/core: ^1.1.8 => 1.1.8

Details

When optimization.concatenateModules is set to true in Rspack, the webpack-license-plugin generates an empty license file instead of outputting the licenses of dependencies. However, it works correctly with Webpack using the exact same configuration.

Reproduce link

https://github.com/Robot-Inventor/rspack-webpack-license-plugin

Reproduce Steps

  1. Run pnpm run build
  2. With Webpack, the webpack-license-plugin correctly generates ./webpack-dist/oss-licenses.json. However, with Rspack, it generates an empty JSON file at ./rspack-dist/oss-licenses.json.
  3. When optimization.concatenateModules is set to false, the webpack-license-plugin generates the correct JSON with Rspack just as it does with Webpack. However, this results in an increase in the script bundle size.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions