@phosit right, I was too quick. So, what works and what does not:
✔ gui/pregame/mainmenu~MyMod.append.js
✖ gui/pregame/mainmenu~MyMod.js
The second approach has worked in all versions prior 28 - and this was "the" established practice, as far as I could see. It looks like the "append" keyword has a special meaning for evaluation of files (I tried with other keywords). Then I have two questions:
Should modders be advised to rename all files of the form "module~MyMod.js" with "module~MyMod.append.js"?
If so, could this be explicited somewhere? Probably not so relevant here https://gitea.wildfiregames.com/0ad/0ad/wiki/PortA27ToR28, but it would have helped.
With "any content" do you mean "no content"? Then that's expected. An empty file shouldn't change the behaviour. eg: appending nothing to the mainmenu.js doesn't change anything.
When adding a `warn` call at global scope of the "append" file, it works for me.