#5972·UglifyJS

await using file = await fs.open("example.txt", "r"); is causing syntax error

Author: yushliCreated Feb 16, 2026Updated Feb 16, 2026

Uglify version (uglifyjs -V) uglify-js 3.19.3 JavaScript input From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/await_using, the following code is causing syntax error: await using file = await fs.open("example.txt", "r"); JavaScript output or error produced. ERROR: Unexpected token: name «file», expected: punc «;»