-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Closed
Copy link
Labels
Description
Description
I'm somewhat confused why some import references are done this way:
} from 'three/nodes';
This code seems to assume that something defines what three/nodes is.
In practice, that means that a importmap is required – and that it's hard to use this code at all when importmaps are not available (e.g. in most bundlers/frameworks).
In vite one needs to do something like this:
resolve: {
alias: {
"three/nodes": "three/examples/jsm/nodes/Nodes.js",
},
},
and then in Next it's different, in bun it's different, ...
I know that previously great care was taken to use relative references throughout the codebase, e.g. here:
import { toTrianglesDrawMode } from '../utils/BufferGeometryUtils.js';
Is there a specific reason for when "indirect" references are used (not sure what the right name is) vs. when relative references are used? Are absolute references considered a bug / could I make PRs to fix them?
Version
r159
gkjohnson