Include THREE module as a global variable to be used with ES5 scripts

Hi, I have a three.js app made with version < 100.
I want to upgrade it to the latest release but I have many functions and classes that are included
through a script TAG, in HTML, that are not modules and expect THREE to exist.

Is there a simple way to include the Three.js module as the old way, in a global THREE variable?
I tried

 <script type="module">
  // part 1
 import * as THREE from './../node_modules/three/build/three.module.js';
   window.THREE=THREE;
<script>

<script>
       // part 2
      var a=new THREE.Scene();
<script>

But If I step into the code part 2 seems to execute before part 1

You can use the defer attribute for those scripts that need to be run after the modules are loaded.

<script src="abc.js" defer></script>

https://www.w3schools.com/tags/att_script_defer.asp

When you save out, in the module tag
window.THREE = THREE;
you can then use it in the later deferred script with
var THREE = window.THREE;
and proceed as normal.