AdonisJS API
    Preparing search index...

    RcFileManager handles loading, parsing, and processing of the AdonisJS configuration file (adonisrc.js). This file contains application metadata, directory mappings, providers, preloads, and other configuration.

    The manager can work with:

    • adonisrc.js file from disk
    • Explicitly provided RC contents (useful for testing)
    const manager = new RcFileManager(new URL('file:///app/'))
    await manager.process()
    console.log(manager.rcFile.providers)
    Index
    rcFile: RcFile

    Reference to the parsed and validated RC file configuration. Available after the process() method has been called successfully.

    • Provides RC file contents programmatically instead of loading from disk. Useful for testing or when the configuration needs to be generated dynamically. Calling this method disables loading adonisrc.js from the file system.

      Parameters

      • value: Record<string, any>

        The RC file contents as an object

      Returns this

      Returns the RcFileManager instance for method chaining

    • Loads and processes the RC file configuration. If rcContents was provided, uses that; otherwise attempts to load adonisrc.js from the application root. Parses and validates the configuration, making it available via the rcFile property.

      Returns Promise<void>

      Promise that resolves when RC file processing is complete

      When adonisrc.js has syntax errors or invalid configuration