JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 272 forks source link

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

Closed shameleo closed 3 years ago

shameleo commented 3 years ago

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:

Other information Related issue: https://github.com/vuejs/vue-loader/issues/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.

bernhardberger commented 3 years ago

Is this fixed yet?

lauraferrandof commented 3 years ago

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

infabo commented 3 years ago

Bump!

tooltonix commented 3 years ago

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

ekasprzyk commented 3 years ago

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 commented 3 years ago

@ekasprzyk Please try 6.0.8