I am using the following but it is not working?
<script type="importmap">
{
"imports": {
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.132.2/examples/jsm/controls/OrbitControls.js"
}
}
</script>
How to import OrbitControls?
When OrbitControls.js
loads into your browser, it doesn’t know what three
is.

So you can tell it what three
is by adding it to your importmap
.
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.132.2/build/three.module.js",
"three/examples/jsm/controls/OrbitControls": "https://unpkg.com/three@0.132.2/examples/jsm/controls/OrbitControls.js"
}
}
</script>