I'm using the svg-transform-loader which transforms SVG files on the fly but then I end up importing a file several times but with different options a query string parameter:
import rocketIcon from 'images/rocket.svg'
import blackRocketIcon from 'images/rocket.svg?fill=#000'
eslint is not happy with that and raises a import/no-duplicates error.
Any idea how I should setup my config so that this plugin actually understands that even if they are based on the same file, it's a valid different import?
Note that it looks a bit like #682, but there it was using different loaders: here we're using the same loader but with different options.
These are indeed two different URLs/modules in browsers, but in node, that鈥檚 still undetermined.
Seems like perhaps an option would be good, and we can decide what to do with it later once node ships ESM.
@ljharb I've sent a PR with an option. I'm not proud of the name though, so feel free to suggest better names.
Most helpful comment
@ljharb I've sent a PR with an option. I'm not proud of the name though, so feel free to suggest better names.