Created by: ffoodd
#37494 replacement POC, adresses #35010 in another way: update banner in dist files when compiling them, respectively using terser and PostCSS.
A few quirks and drawbacks that need a bit more work:
- I used as much data from
package.json
as I could (even added some in theconfig
entry) as it was done inbuild/banner.js
but that may be overthought: most of them could be hardcoded I think. - one of the drawbacks is that a few words should be capitalized, which will need some work—or we hardcode them
😇
Regarding JavaScript components, they're built using Rollup: terser doesn't run on those files, so my current changes only works on dist/js/
files. I didn't try anything for now since my initial idea was missing the fact that banner are already in our sources, not only in dist files.
So IMHO this is not meant to be merged but only to show a few more possibilities regarding banners.
@GeoSot if you have any idea to push further or want me to dig deeper, I could try :)