Skip to content

The plugin doesn-t see rules if config in oneOf #500

@artemkliaus

Description

@artemkliaus

Do you want to request a feature, report a bug or ask a question?
A bug

What is the current behavior?
Then rules for the plugin set in webpack config webpack rule oneof
Script doesn't get it.
What is the expected behavior?
The plugin correct read the 'oneof' rule.
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.

...
    rules: [
      {
        test: /\.css$/,
        oneOf: [
          {
            resourceQuery: /inline/, // foo.css?inline
            use: 'url-loader',
          },
          {
            resourceQuery: /external/, // foo.css?external
            use: 'file-loader',
          },
        ],
      },
    ],
    ...

The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
It you don't want to create a repository - create a gist with multiple files

If this is a feature request, what is motivation or use case for changing the behavior?

Please tell us about your environment:

  • Node.js version: 16
  • webpack version: 5.55.1
  • svg-sprite-loader version: 6.0.11
  • OS type & version: ?

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

The bug in this file - https://github.com/JetBrains/svg-sprite-loader/blob/master/lib/utils/get-matched-rule-5.js#L17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions