-
-
Notifications
You must be signed in to change notification settings - Fork 182
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature you'd like:
Since r144 (mrdoob/three.js#23406), three.js supports a three/addons alias that would currently redirect to three/examples/jsm.
For instance, the following resolve to the same file:
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'Suggested implementation:
TypeScript doesn't recognize the above behavior since the alias is currently handled through package.exports and types only exist for examples/jsm on disk (this might be something to check in TypeScript upstream). We can implement this by copying examples/jsm to addons at build-time if there's no easy way to alias as a library.
You can work-around this in user-land with:
{
"compilerOptions": {
"paths": {
"three/addons/*": ["./node_modules/three/examples/jsm/*"]
}
}
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request