MZ Question about "Import / Export" keyword not working

Would anyone know if I can use Import / Export keywords?

I have about 12 js files that cross reference each other, and the way they know of each other is that each file is listed via the Plugin Manager and thus gets ingested as a plugin on start-up.

Ideally, I would like to use import / export keyword, so the files know about each other using the regular js mechanism, and there is only one single Plugin Manager entry for the whole game backend.

The error I am getting:

Spoiler: Illustration
Untitled.png

My code:

JavaScript:
'use strict';

class my_Game{
    // ... constructor, methods, attributes, etc.
}

export { my_Game };
I don't think you can import/export within the scripts themselves because of the way that they are loaded. They pretty much run everything through global objects instead of import/export. The best way to get around that is by using webpack or similar to bundle your js and then manually putting that script onto the dom by editing the index.html. At least that's the way that I do that, then all you need to do is make small scripts that hook into game related stuff via your global object.
If you place your script tag under theirs on the index.html it basically loads "main" -> the order of scriptUrls -> yours -> plugin manager script order.

I could be wrong and there probably is a way to import/export but then you can have the added benefits of using webpack for minification and other useful stuff.

Edit: Changed script load order to reflect actual order.

Original thread: https://forums.rpgmakerweb.com/threads/question-about-import-export-keyword-not-working.146588/