PhaserEditor cannot use import statement outsie of module

Hi,

I’m using Phaser Editor. In my player prefab I want to add new bullet to scene’s group using createFromConfig whenever shootBullet function is fired, but when I import Bullet class from other file I got error when game starts:

Uncaught SyntaxError: Cannot use import statement outside a module

ES Modules are not supported in Phaser Editor? Is there any way I can configure my project so it will work?

Try put type="module" on your Phaser <script> (inside of index.html).

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.

I got this after writing type=“module”

Look in dev tools Network pane to see what actually loaded. Probably there is no script there.