In my memories ES6 was not supported due to the limit of ResourceLoader (it was quite a few versions ago), but now ResourceLoader does support ES6. I was told that you can use mw.loader.load
but this way there would be a lot of scripts loaded separately, making the packaging meaningless. Seems like there is a "package" option available (unfortunately only in 1.38 and later) and I'm kinda interested.
Topic on Extension talk:Gadgets
I believe ES6 support is still blocked by phab:T75714. Besides, per phab:T75714#7365697:
You can use mw.loader.load to load non-gadget non-es5 user scripts (from a URL). You just can't use >es5 in ResourceLoader JS (including user and MediaWiki common.js and skin.js files and gadgets).
As I said, this way there would be a lot of scripts loaded separately. Anyway, thanks for your explanation!