@oazmi/superbuild - v0.1.0
    Preparing search index...

    Interface OnEmitOptions

    interface OnEmitOptions {
        filter: RegExp;
        inputs?: OnEmitOptions_InputFilter[];
    }
    Index

    Properties

    Properties

    filter: RegExp

    a filter for the output filename of a file that is to be emitted.

    a filter for specifying which input resources should be part of what constitutes this output file.

    for instance, if one were to bundle entrypoints A and B, and A depended on X and Y, while B depended on Y and Z, then the emitted bundled file corresponding to entrypoint A will have all three A, X, and Y show up in its inputs array. similarly, the emitted bundled file corresponding to entrypoint B will have all three B, Y, and Z show up in its inputs array.

    when multiple input filters are specified, they (the filters) will all need to be satisfied simultaneously (logical AND) by the list of available OnEmitArgs.inputs of the emitted resource. for instance, for the scenario mentioned prior:

    • if inputs = [{ filter: /A/ }, { filter: /Y/ }], then the emitted file corresponding to entrypoint A will be matched, but not B (since it has no input with the name A).
    • if inputs = [{ filter: /Y/ }], then the emitted files corresponding to both entrypoints A and B will be matched (since they both incorporate the dependency file Y).
    • if inputs = [{ filter: /Y/ }, { filter: /Z/ }], then only the emitted file corresponding to entrypoint B will be matched, and not A (since A does not incorporate the dependency file Z).