Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit be1ab75

Browse files
add missing await to setupDevPlatform call in next-dev readme (#668)
1 parent 90e140c commit be1ab75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal-packages/next-dev/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ export default nextConfig;
5353
// we only need to use the utility during development so we can check NODE_ENV
5454
// (note: this check is recommended but completely optional)
5555
if (process.env.NODE_ENV === 'development') {
56-
// we simply need to call the utility
57-
setupDevPlatform();
56+
// `await`ing the call is not necessary but it helps making sure that the setup has succeeded.
57+
// If you cannot use top level awaits you could use the following to avoid an unhandled rejection:
58+
// `setupDevPlatform().catch(e => console.error(e));`
59+
await setupDevPlatform();
5860
}
5961
```
6062

0 commit comments

Comments
 (0)