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/lynxtron/api/@lynx-js/lynxtron-dev-plugins/index.md.
  • English
  • @lynx-js/lynxtron-dev-plugins

    @lynx-js/lynxtron-dev-plugins provides development-time build plugins for coordinating RSpeedy, Rspack, and Lynxtron process startup.

    RSpeedy Dev Ready Plugin

    Import pluginRspeedyDevReady() from @lynx-js/lynxtron-dev-plugins/rspeedy:

    import { pluginRspeedyDevReady } from '@lynx-js/lynxtron-dev-plugins/rspeedy';
    
    export default {
      plugins: [pluginRspeedyDevReady()],
    };

    The plugin emits status signals when the RSpeedy dev server starts and when the first dev compilation completes:

    Output / FileDescription
    RSPEEDY_DEV_SERVER:<port>Prints the dev server port after startup.
    RSPEEDY_READYPrints after the first dev compilation completes.
    .tmp/dev-ready.rspeedy.jsonWrites { "ready": true } after the first dev compilation so waiting scripts can detect readiness.

    dev-ready-rspeedy CLI

    dev-ready-rspeedy waits for .tmp/dev-ready.rspeedy.json, checks ready: true, deletes the file after reading it, and prints dev-ready-speedy. The default timeout is 300 seconds.

    npx dev-ready-rspeedy

    Rspack Lynxtron Plugin

    Import pluginLynxtron() from @lynx-js/lynxtron-dev-plugins/rspack:

    import { pluginLynxtron } from '@lynx-js/lynxtron-dev-plugins/rspack';
    
    export default {
      plugins: [
        pluginLynxtron({
          entry: './dist/main/main.js',
          isDev: true,
          args: ['--inspect=9222'],
        }),
      ],
    };

    After each Rspack compilation completes, the plugin starts or restarts the Lynxtron process.

    OptionTypeDescription
    entrystringRequired. The app entry passed to the Lynxtron CLI.
    isDevbooleanDevelopment mode flag. When true, minimize is disabled. The plugin sets Rspack optimization.nodeEnv to false.
    argsstring[]Extra arguments passed to the Lynxtron CLI.
    envRecord<string, string>Extra environment variables passed to the Lynxtron child process.
    commandstringLynxtron launch command. Defaults to lynxtron.
    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.