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

Applying plugin only for specific SVG's #102

Open
osvaldasvalutis opened this issue Feb 12, 2021 · 0 comments
Open

Applying plugin only for specific SVG's #102

osvaldasvalutis opened this issue Feb 12, 2021 · 0 comments

Comments

@osvaldasvalutis
Copy link

osvaldasvalutis commented Feb 12, 2021

I wanted to apply the plugin only for specific SVG files i.e. only the ones that contain svg-transform-loader param in their references:

module.exports = {
  module: {
    rules: [
      {
        test: /\.svg\?svg-transform-loader/
        use: [
          'url-loader',
          'svg-transform-loader'
        ]
      }
    ]
  }
}
background-image: url("../../images/icons/arrow.svg?svg-transform-loader&fill=#fff")

However, this doesn't match the references and ends up in "You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file" error. Any idea why? Thank you.

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

1 participant