From be1ab75a0a5214e047c5a0cbb09d657b99e46bfc Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Tue, 20 Feb 2024 12:13:02 +0000 Subject: [PATCH] add missing `await` to `setupDevPlatform` call in next-dev readme (#668) --- internal-packages/next-dev/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal-packages/next-dev/README.md b/internal-packages/next-dev/README.md index d236e6030..3ba75a0dd 100644 --- a/internal-packages/next-dev/README.md +++ b/internal-packages/next-dev/README.md @@ -53,8 +53,10 @@ export default nextConfig; // we only need to use the utility during development so we can check NODE_ENV // (note: this check is recommended but completely optional) if (process.env.NODE_ENV === 'development') { - // we simply need to call the utility - setupDevPlatform(); + // `await`ing the call is not necessary but it helps making sure that the setup has succeeded. + // If you cannot use top level awaits you could use the following to avoid an unhandled rejection: + // `setupDevPlatform().catch(e => console.error(e));` + await setupDevPlatform(); } ```