Webpack Warning with three.js and topLevelAwait

Hi everyone,

I’m encountering a warning in Webpack Dev Mode while working on a project that uses three.js. The issue is specifically related to topLevelAwait and async/await functionality. Here’s the warning message I’m seeing:

WARNING in ./node_modules/three/build/three.webgpu.js
The generated code contains 'async/await' because this module is using "topLevelAwait".
However, your target environment does not appear to support 'async/await'.
As a result, the code may not run as expected or may cause runtime errors.

Is anyone else receiving this message?

webpack: 5.93.0
webpack-dev-server: 4.15.0
three: 0.167.1

update to latest three,
try again,
if it still doesn’t work, show your whole package.json

2 Likes

The WARNING message disappeared when I updated Three and webpack-dev-server to the latest version.
Thank you for the prompt response! :slight_smile: