Why my import * as THREE from *three* didn't work?

In browsers you can’t use so called “bare imports”. There are two recommended workflows.

You can then write the import like so:

import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.117.1/build/three.module.js';

Besides, you can only use ES6 import syntax when you enhance the script tag like so:

<script type="module">