For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/rspeedy/rspeedy.dev.livereload.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/rspeedy > Dev > liveReload

    Dev.liveReload property

    Whether to enable live reload functionality.

    Signature:

    liveReload?: boolean | undefined;

    Default Value

    true

    Live reload is used as a fallback when Dev.hmr is disabled or cannot be used in certain scenarios. When enabled, the page will automatically refresh when source files are changed.

    To completely disable both HMR and live reload, set both dev.hmr and dev.liveReload to false. Then, no WebSocket requests will be made to the dev server on the page, and the page will not automatically refresh when file changes.

    Example 1

    Disable live reload:

    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      dev: {
        liveReload: false,
      },
    })

    Example 2

    Disable both HMR and live reload:

    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      dev: {
        hmr: false,
        liveReload: false,
      },
    })
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.