this is the common configuration interface for loader functions of most plugins of this library.

interface CommonPluginLoaderConfig {
    namespace: string;
    log?: boolean;
    defaultLoader: Loader;
    acceptLoaders?: Loader[];
}

Properties

namespace: string

the namespace that the plugin should use. this value is only used for logging purposes, and nothing more.

log?: boolean

enable logging of the input arguments and preferred loader, when DEBUG.LOG is ennabled.

false

defaultLoader: Loader

the default loader that the plugin's loader should use for unidentified content types.

if you would like to use esbuild's own default loader, set the value to "default".

acceptLoaders?: Loader[]

only accept the following subset of loaders when auto content-detection is used for guessing the loader type.

Note

if there is no intersection between the set of guessed loaders, and this set of acceptLoaders, then the default loader (defaultLoader) will be used as a fallback.

all available esbuild loaders