@oazmi/esbuild-plugin-deno - v0.4.0
    Preparing search index...

    Interface NpmAutoInstallCliConfig

    these options let you precisely customize how and where your missing npm-packages should get installed.

    interface NpmAutoInstallCliConfig {
        dir: NodeModuleDirFormat;
        command: (package_name_and_version: string) => string;
        log?: boolean | LoggerFunction;
    }
    Index

    Properties

    Properties

    specify the working-directory where your npm command should be invoked, so that your package will get installed to ${dir}/node_modules/.

    note that a trailing slash is always added to dir if it's missing it, and you can also provide a non-normalized path, or relative paths with respect to esbuild's absWorkingDir (which fallbacks to the runtime's current-working-directory if undefined).

    furthermore, you should not add this directory to the NpmPluginSetupConfig.nodeModulesDirs array, because the plugin will add this dir to the beginning of that array internally.

    DIRECTORY.ABS_WORKING_DIR

    command: (package_name_and_version: string) => string

    a function which should accept the package name-and-version string (such as "react@17 - 19"), and then return a cli command, that when executed, will install the npm-package to the ${dir}/node_modules/ folder.

    note that you can technically change the directory where the command is executed using cd, however if you down a subdirectory (for instance cd ./temp/ && npm install "${package_name_and_version}" --no-save), then the installed package will not be discoverable by esbuild's node-resolution-algorithm, because it only traverses upwards. thus, you may only navigate to ancestral directories (such as cd ../temp/ && npm install "${package_name_and_version}" --no-save), for the new package to be discoverable by esbuild.

    (package_name_and_version: string) => (`npm install "${package_name_and_version}" --no-save`)

    log?: boolean | LoggerFunction

    enable logging of the npm-package installation command, when DEBUG.LOG is ennabled.