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 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'],
        }),
      ],
    };

    The plugin starts or restarts Lynxtron after compilation only when isDev is true and entry is provided. AutoLink is enabled by default in development and production builds; using AutoLink alone does not require entry.

    OptionTypeDescription
    entrystringOptional. The app entry passed to the Lynxtron CLI; required for automatic development-time startup.
    isDevbooleanDevelopment mode flag. When true, minimize is disabled. The plugin sets Rspack optimization.nodeEnv to false.
    argsstring[]Extra arguments passed to the Lynxtron CLI.
    autolinkbooleanEnable native-library AutoLink. Defaults to true.
    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.