Skip to content

Include app startup into loading time #265

Open
@eric-burel

Description

@eric-burel

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions