How to run two different phaser3 games on the same web page?

Hi!
I’ve created two Phaser 3 games and tried to publish them on the same web page.
One of the games works perfectly and the other not at all.
Each game has its own js-file. The last loaded script works. The other doesn’t.
There are no errors in a console.
What are the main rules to do such things as to run two or more Phaser 3 games on the same web page?
Thanks in advance!

It seems it’s impossible to run two or more Phaser3 games on the same web page. I tried to do that in different ways and I failed ((
Did anyone do that in the past?

Hi @valeriyruss,
Something like this?:

See the Pen 2 Phaser games in same page by Juan Jose Capellan (@jjcapellan) on CodePen.

Greetings.

@jjcapellan, thanks a lot for this example!
It seems I have to create one js-file for two games and everything will work.
I’ll try this approach.
Thanks, @jjcapellan, one more time!

It is not necessary. The most important is to have two instances of the Phaser.Game object.

@jjcapellan, I did as you advised and now everything works fine! Thanks!