How to add an explicit timestamp to a file by webpack

I want to add a line of comments to the result file through webpack packaging. The comment content is the packing time, for example:

clipboard.png

I looked around but couldn"t find it.

Note that doesn"t need a hash value, just want to open the file and know exactly when the file was packaged .

Mar.07,2021

new webpack.BannerPlugin(new Date().toString())
Menu