Browse Source

Editor: use importmap for `app/index.html` (#28195)

林炳权 1 year ago
parent
commit
7376a8d232
1 changed files with 8 additions and 1 deletions
  1. 8 1
      editor/js/libs/app/index.html

+ 8 - 1
editor/js/libs/app/index.html

@@ -18,9 +18,16 @@
 		</style>
 	</head>
 	<body ontouchstart="">
+		<script type="importmap">
+			{
+				"imports": {
+					"three": "./js/three.module.js"
+				}
+			}
+		</script>
 		<script type="module">
 
-			import * as THREE from './js/three.module.js';
+			import * as THREE from 'three';
 			import { APP } from './js/app.js';
 
 			window.THREE = THREE; // Used by APP Scripts.