The example you shared is using import maps which defines the directory required as three/nodes…
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/",
"three/nodes": "./jsm/nodes/Nodes.js"
}
To achieve the import in vite you would use the absolute path name eg…
three/examples/jsm/nodes/Nodes.js