-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add webgpu async check #29927
Add webgpu async check #29927
Conversation
With #29933 merged, what parts of the existing |
"await" cause issue because it does not allow Global scoped await. |
So what you are saying is that Instead of adding a separate module, I was hoping adding |
Node.js supports top-level await (TLA) in all active versions, but some tooling does not. Node.js v22+ has greatly improved ESM support over previous versions, with one notable limitation: CommonJS modules cannot import ESM modules that use TLA, for sync/async reasons. But I'm not sure if CommonJS is related to the reported issues in Next.js. I'd like to reproduce the issue before we commit to a particular fix for it, see #29916 (comment). Possibly there are other options. I would have hoped a |
The ideal is we want to remove all "global" stuff to make it best compatibility with node development. |
It will create confliction until we update repo @type/three |
Also, I propose to update WebGPU and all example to async check (instead of global scope) because of limitation of current browser webgpu context checking. |
Closing, see #29919 (comment). |
Related issue: #29916
Description
We want to use WebGPU capability check in nodejs project.