-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Open
Description
Description
Reading any three/webgpu code causes an error in Bun since r182, even without trying to execute any Three.js code on the server:
import { WebGPURenderer } from "three/webgpu"
console.log(WebGPURenderer)This can happen during app builds or when running tests, for example.
73269 | [ ClampToEdgeWrapping ]: 'clamp',
73270 | [ MirroredRepeatWrapping ]: 'mirror'
73271 | };
73272 |
73273 | const gpuShaderStageLib = {
73274 | 'vertex': GPUShaderStage.VERTEX,
^
TypeError: undefined is not an object (evaluating 'GPUShaderStage.VERTEX')
at /Users/verekia/Local/Code/three-182-bun/node_modules/three/build/three.webgpu.js:73274:12
at loadAndEvaluateModule (2:1)Tested on Bun 1.3.4.
Node and Deno seem fine.
Three.js r181 works.
Reproduction steps
Minimal repro repo with and without Docker:
https://github.com/verekia/three-182-bun
Code
import { WebGPURenderer } from "three/webgpu"
console.log(WebGPURenderer)Live example
https://github.com/verekia/three-182-bun
Screenshots
No response
Version
182
Device
No response
Browser
No response
OS
No response