webpack-chain icon indicating copy to clipboard operation
webpack-chain copied to clipboard

Typescript module.rule.resource is missing

Open zerrol opened this issue 4 years ago • 0 comments

version: 6.5.1

types/index.d.ts rule.resource is missing

  class Rule<T = Module> extends ChainedMap<T> implements Orderable {
    rules: TypedChainedMap<this, Rule<Rule>>;
    oneOfs: TypedChainedMap<this, Rule<Rule>>;
    uses: TypedChainedMap<this, Use>;
    include: TypedChainedSet<this, webpack.Condition>;
    exclude: TypedChainedSet<this, webpack.Condition>;
    resolve: Resolve<Rule<T>>;

    parser(value: { [optName: string]: any }): this;
    test(value: webpack.Condition | webpack.Condition[]): this;
    type(
      value:
        | 'javascript/auto'
        | 'javascript/dynamic'
        | 'javascript/esm'
        | 'json'
        | 'webassembly/experimental',
    ): this;
    enforce(value: 'pre' | 'post'): this;

    use(name: string): Use<this>;
    rule(name: string): Rule<Rule>;
    oneOf(name: string): Rule<Rule>;
    pre(): this;
    post(): this;
    before(name: string): this;
    after(name: string): this;
    resourceQuery(value: webpack.Condition | webpack.Condition[]): this;
  }

webpack doc

Rule.resource A Condition matched with the resource. See details in Rule conditions.

zerrol avatar Aug 06 '20 12:08 zerrol