Is there any way to use importmap to map all paths in examples/jsm?
For example, in my typescript project I have:
import { WebGLRenderer } from 'three';
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
I would like to import a bunch of files from /examples/jsm without using a bundler.
In my index.html I setup importmap as:
<script type="importmap">
{
"imports": {
"three": "./node_modules/three/build/three.module.js",
"three/examples/jsm/": "./node_modules/three/examples/jsm/" // THIS DOES NOT WORK
}
}
</script>
The import map works only if you specify each file in examples individually with full path and that is super inconvenient.
I would like to import a bunch of files from /examples/jsm without using a bundler.
modern build tools don’t bundle, they’re based on esbuild (for instance vite). you get pure esm, dev serve and build with full tree shaking and compression ootb.