-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGPURenderer: Top-level await is not available in vite. #26626
Comments
I just ran into this with my four library for the same reason. This comes from Vite's You can use https://github.com/Menci/vite-plugin-top-level-await or tweak the target with: // vite.config.js
optimizeDeps: {
esbuildOptions: {
target: 'esnext'
}
},
build: {
target: 'esnext'
} It's a bit unfortunate Vite/ESBuild/browserslist is pedantic about this since ESM spec guarantees the availability of top-level await since early 2021. I'm not aware of a workaround for libraries at the moment. |
|
Is this good if I'm not doing a build, just using THREE? |
Description
As the title.
Reproduction steps
pnpm create vite threejs-template --template vanilla-ts
cd threejs-template
pnpm install
pnpm install -D three
replace
main.ts
source code with:the terminal will show the error info
Code
Live example
None
Screenshots
No response
Version
r155
Device
Desktop
Browser
No response
OS
Windows
The text was updated successfully, but these errors were encountered: