Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include app startup into loading time #265

Open
eric-burel opened this issue Aug 19, 2024 · 0 comments
Open

Include app startup into loading time #265

eric-burel opened this issue Aug 19, 2024 · 0 comments

Comments

@eric-burel
Copy link
Contributor

eric-burel commented Aug 19, 2024

Is your feature request related to a problem?

Next.js app may take a long time to boot up, especially in dev mode with the first compilation.

In this image, you see that while SWC is being download, and then the app compiled (multiple seconds, it feels forever), you don't see the app as loading but a white screen. Here the terminal helps seeing what happens but usually it's not open, so the end user just feels something is wrong.

image

Describe the solution you'd like.

Be able to make the "loading" step last longer, until the app is actually started.

We have a nice loader but it stops too early, when the Next.js app seems to start, but a few seconds will elapse after the message disappear and the homepage of the app actually appears.

image

Describe alternatives you've considered.

VS Code typically detects when your app is started by parsing the console.log to find a URL, like "app started on localhost:3000" (not perfect but still useful, see this related issue. It's also the idea of start-server-and-test package, used to trigger end to end tests.

We could have a similar regex based solution to detect that the app has started.

On this example, "compiled /" is the right message (Next.js is a tricky case for this feature).
image

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants