How to work simply with module

Hi,

When is use Three.js with modules, no problems. But with Phaser it seems that it’s not the the same logical…Why ? Could you explain what i’m doing wrong and the solution ? (I would like to use the simplest way like in three.js…not with webpack or parcel…)

Here a basic example, my error is this (see my 01.png)

index.html

<!DOCTYPE html>
<html>
<head>
	<script type=module src=main.js></script>
</head>
</html>

main.js

import * as Phaser from "https://cdn.jsdelivr.net/npm/phaser@3.15.1/dist/phaser.js"
var config = {
	type: Phaser.AUTO,
	width: 800,
	height: 600,
	physics: {
		default: 'arcade',
		arcade: {
			gravity: {
				y: 200
			}
		}
	},
	scene: {
		preload: preload,
		create: create
	}
};
console.log('ok')

var game = new Phaser.Game(config);

function preload() {
	this.load.setBaseURL('http://labs.phaser.io');

	this.load.image('sky', 'assets/skies/space3.png');
	this.load.image('logo', 'assets/sprites/phaser3-logo.png');
	this.load.image('red', 'assets/particles/red.png');
}

function create() {
	this.add.image(400, 300, 'sky');

	var particles = this.add.particles('red');

	var emitter = particles.createEmitter({
		speed: 100,
		scale: {
			start: 1,
			end: 0
		},
		blendMode: 'ADD'
	});

	var logo = this.physics.add.image(400, 100, 'logo');

	logo.setVelocity(100, 200);
	logo.setBounce(1, 1);
	logo.setCollideWorldBounds(true);

	emitter.startFollow(logo);
}

Nobody ???

Phaser 3 doesn’t export an ES module.

ohhhhhh…