Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Compiling RuleSet failed: Properties generator are unknown" error #428

Closed
shameleo opened this issue Dec 29, 2020 · 6 comments
Closed

"Compiling RuleSet failed: Properties generator are unknown" error #428

shameleo opened this issue Dec 29, 2020 · 6 comments

Comments

@shameleo
Copy link

shameleo commented Dec 29, 2020

Do you want to request a feature, report a bug or ask a question?
Bug
What is the current behavior?
When I use webpack 5 Asset Modules feature and svg-sprite-loader at the same time I get error mentioned in title.
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.

module: {
    rules: [
        // ...
        {
            test: /\.(woff|jpg|png|gif)$/,
            type: 'asset/resource',
            generator: {
                filename: `assets/[name]${bldHash}.[ext]`
            }
        },
        {
            test: /\.svg$/,
            loader: 'svg-sprite-loader',
            options: {
                extract: true,
                // ...
            }
        }
    ]
},

Please tell us about your environment:

  • Node.js version: v12.18.3
  • webpack version: 5.11.1
  • svg-sprite-loader version: 5.2.1

Other information
Related issue: vuejs/vue-loader#1729
Fix is really simple:
/lib/utils/get-matched-rule-5.js

const ruleSetCompiler = new RuleSetCompiler([
  // ...
  new BasicEffectRulePlugin('generator'),   // add this
  // ...
]);

It worked for me. Anyway, I have no idea, what I'm doing (why loader depends on options which are not even related to it?), so I'd like not to create PR and let you to fix it consciousnessly.

shameleo added a commit to shameleo/svg-sprite-loader that referenced this issue Jan 23, 2021
@bernhardberger
Copy link

Is this fixed yet?

@lauraferrandof
Copy link

Any news on this bug? I'm still getting it with the latest versions of webpack and svg-sprite-loader 😢

@infabo
Copy link

infabo commented Apr 27, 2021

Bump!

@tooltonix
Copy link

When will #454 be available in a new version or when will there be a new version? i need these changes urgently.

@ekasprzyk
Copy link

Running on 6.0.7 and still getting this issue. Has the fix been released? (I can't find it inside the 6.0.7 version comparison with 5.*)

@d3x42
Copy link
Contributor

d3x42 commented Jun 21, 2021

@ekasprzyk Please try 6.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants