You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default value for outputFilename in license-webpack-plugin is '[name].licenses.txt';
however, perChunkOutput enabled or not, the '[name]' will not be replaced at all, resulting in license-webpack-plugin to only generate one [name].licenses.txt[sic] file and just keep overwriting it.
indeed the compilation object only has a hash property, therefore getPath will only replace [hash] and nothing else;
Webpack 5 does replace [name] though.
Interestingly I also use the built in CssExtractRspackPlugin
plugins: [
...
new rspack.CssExtractRspackPlugin({
filename: './style/[name].min.css',
}),
],
which does replace [name] though; I wonder what's the difference?
System Info
Details
The default value for
outputFilename
inlicense-webpack-plugin
is'[name].licenses.txt'
;however,
perChunkOutput
enabled or not, the'[name]'
will not be replaced at all, resulting inlicense-webpack-plugin
to only generate one[name].licenses.txt
[sic] file and just keep overwriting it.I did some debugging,
https://github.com/xz64/license-webpack-plugin/blob/32bf7a4cca560f05ed72b6b3aba47c3a7dd1f290/src/WebpackAssetManager.ts#L53-L54
rspack/packages/rspack/src/Compilation.ts
Line 889 in 7cddc17
indeed the
compilation
object only has ahash
property, thereforegetPath
will only replace[hash]
and nothing else;Webpack 5 does replace
[name]
though.Interestingly I also use the built in
CssExtractRspackPlugin
which does replace
[name]
though; I wonder what's the difference?Meantime perhaps we should add a note in https://rspack.dev/guide/compatibility/plugin#plugin-compatibility?
Reproduce link
No response
Reproduce Steps
Just add
to any rspack config. The output license file would be
[name].license.txt
[sic].The text was updated successfully, but these errors were encountered: