You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vite v2.9.15 building for production...
✓ 51 modules transformed.
rendering chunks (2)...[vite:esbuild-transpile] Transform failed with 1 error:
assets/profileScreen.ts.af6d3823.js:167:25: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
165| const username = getGithubUsername(window.location.href);
166| if (username != null) {
167| const openSaucedUser = await getOpenSaucedUser(username);
| ^
168| if (openSaucedUser)
169| injectViewOnOpenSaucedButton(username);
error during build:
Error: Transform failed with 1 error:
assets/profileScreen.ts.af6d3823.js:167:25: ERROR: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
at failureErrorWithLog (/Users/bdougie/code/browser-extensions/node_modules/esbuild/lib/main.js:1624:15)
at /Users/bdougie/code/browser-extensions/node_modules/esbuild/lib/main.js:1413:29
at /Users/bdougie/code/browser-extensions/node_modules/esbuild/lib/main.js:678:9
at handleIncomingPacket (/Users/bdougie/code/browser-extensions/node_modules/esbuild/lib/main.js:775:9)
at Socket.readFromStdout (/Users/bdougie/code/browser-extensions/node_modules/esbuild/lib/main.js:644:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Steps to reproduce
A new build error was introduced in the last merge.
Affected services
opensauced.pizza
Platforms
No response
Browsers
No response
Environment
No response
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct
Contributing Docs
I agree to follow this project's Contribution Docs
The text was updated successfully, but these errors were encountered:
@bdougie, It does seem the build process fails due to top-level awaits. Even with ESNext in the tsconfig. I'll wrap it in an async() to resolve this.
Edit: Turns out that ESNext has to be set as the build target in the vite.config.ts file too.
Describe the bug
Steps to reproduce
A new build error was introduced in the last merge.
Affected services
opensauced.pizza
Platforms
No response
Browsers
No response
Environment
No response
Additional context
No response
Code of Conduct
Contributing Docs
The text was updated successfully, but these errors were encountered: