A rule description with conditions and effects for modules.

Hierarchy

  • RuleSetRule

Properties

assert?: {
    [index: string]: RuleSetConditionOrConditions;
}

Match on import assertions of the dependency.

Type declaration

compiler?: string | RegExp | RuleSetLogicalConditions | ((value) => boolean) | RuleSetCondition[]

Match the child compiler name.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

dependency?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match dependency type.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

descriptionData?: {
    [index: string]: RuleSetConditionOrConditions;
}

Match values of properties in the description file (usually package.json).

Type declaration

enforce?: "pre" | "post"

Enforce this rule as pre or post step.

exclude?: string | RegExp | RuleSetLogicalConditionsAbsolute | ((value) => boolean) | RuleSetConditionAbsolute[]

Shortcut for resource.exclude.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

generator?: {
    [index: string]: any;
}

The options for the module generator.

Type declaration

  • [index: string]: any
include?: string | RegExp | RuleSetLogicalConditionsAbsolute | RuleSetConditionAbsolute[] | ((value) => boolean)

Shortcut for resource.include.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

issuer?: string | RegExp | RuleSetLogicalConditionsAbsolute | RuleSetConditionAbsolute[] | ((value) => boolean)

Match the issuer of the module (The module pointing to this module).

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

issuerLayer?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match layer of the issuer of this module (The module pointing to this module).

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

layer?: string

Specifies the layer in which the module should be placed in.

loader?: string

Shortcut for use.loader.

mimetype?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match module mimetype when load from Data URI.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

oneOf?: RuleSetRule[]

Only execute the first matching rule in this array.

options?: string | {
    [index: string]: any;
}

Shortcut for use.options.

Type declaration

  • [index: string]: any
parser?: {
    [index: string]: any;
}

Options for parsing.

Type declaration

  • [index: string]: any
realResource?: string | RegExp | RuleSetLogicalConditionsAbsolute | RuleSetConditionAbsolute[] | ((value) => boolean)

Match the real resource path of the module.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

Options for the resolver.

resource?: string | RegExp | RuleSetLogicalConditionsAbsolute | RuleSetConditionAbsolute[] | ((value) => boolean)

Match the resource path of the module.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

resourceFragment?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match the resource fragment of the module.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

resourceQuery?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match the resource query of the module.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

rules?: RuleSetRule[]

Match and execute these rules when this rule is matched.

scheme?: string | RegExp | RuleSetLogicalConditions | RuleSetCondition[] | ((value) => boolean)

Match module scheme.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

sideEffects?: boolean

Flags a module as with or without side effects.

test?: string | RegExp | RuleSetLogicalConditionsAbsolute | RuleSetConditionAbsolute[] | ((value) => boolean)

Shortcut for resource.test.

Type declaration

    • (value): boolean
    • Parameters

      • value: string

      Returns boolean

type?: string

Module type to use for the module.

use?: string | RuleSetUseItem[] | ((data) => RuleSetUseItem[]) | {
    ident?: string;
    loader?: string;
    options?: string | {
        [index: string]: any;
    };
} | ((data) => string | __TypeWebpackOptions | RuleSetUseItem[] | {
    ident?: string;
    loader?: string;
    options?: string | {
        [index: string]: any;
    };
})

Modifiers applied to the module when rule is matched.

Type declaration

    • (data): RuleSetUseItem[]
    • Parameters

      • data: {
            compiler: string;
            issuer: string;
            realResource: string;
            resource: string;
            resourceQuery: string;
        }
        • compiler: string
        • issuer: string
        • realResource: string
        • resource: string
        • resourceQuery: string

      Returns RuleSetUseItem[]

Type declaration

  • Optional ident?: string

    Unique loader options identifier.

  • Optional loader?: string

    Loader name.

  • Optional options?: string | {
        [index: string]: any;
    }

    Loader options.

Type declaration

    • (data): string | __TypeWebpackOptions | RuleSetUseItem[] | {
          ident?: string;
          loader?: string;
          options?: string | {
              [index: string]: any;
          };
      }
    • Parameters

      • data: object

      Returns string | __TypeWebpackOptions | RuleSetUseItem[] | {
          ident?: string;
          loader?: string;
          options?: string | {
              [index: string]: any;
          };
      }

Generated using TypeDoc