Documentation
    Preparing search index...

    Hooks executed when running the development server.

    const devServerHooks: DevServerHooks = {
    devServerStarting: [
    () => import('./hooks/before_dev_server_start')
    ],
    devServerStarted: [
    () => import('./hooks/after_dev_server_start')
    ]
    }
    type DevServerHooks = {
        devServerStarting: LazyImport<(server: DevServer) => AsyncOrSync<void>>[];
        devServerStarted: LazyImport<
            (
                server: DevServer,
                info: { port: number; host: string },
                uiInstructions: Instructions,
            ) => AsyncOrSync<void>,
        >[];
    }
    Index

    Properties

    devServerStarting: LazyImport<(server: DevServer) => AsyncOrSync<void>>[]

    The hook is executed before the child process for the dev server is started. Use this hook to perform setup tasks or modify server configuration.

    The DevServer instance that is about to start

    devServerStarted: LazyImport<
        (
            server: DevServer,
            info: { port: number; host: string },
            uiInstructions: Instructions,
        ) => AsyncOrSync<void>,
    >[]

    The hook is executed after the child process has been started. Use this hook to display additional information or perform post-startup tasks.

    The DevServer instance that has started

    Server information containing port and host

    The port number the server is running on

    The host address the server is bound to

    UI instructions for displaying server information