Open fl-y opened 1 year ago
Make it possible to add an exception array for attribute removal for @svgr/babel-plugin-remove-jsx-attribute
I remove the 'fill' and 'fillOpacity' properties so that I can change the colour when I want for most SVGs, however this doesn't work for certain SVGs
module.exports = { // settings jsx: { babelConfig: { plugins: [ [ '@svgr/babel-plugin-remove-jsx-attribute', { elements: ['svg', 'path'], attributes: ['fill', 'fill-opacity'], exclude: ['example.svg', 'example-2.svg'], }, ], ], }, }, }
~Will attempt to implement it myself with a subsequent PR~ but thought other devs will probably need this some way or another
Couldn't easily figure out how to access the filename - will try to pick it up some time later
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
🚀 Feature Proposal
Make it possible to add an exception array for attribute removal for @svgr/babel-plugin-remove-jsx-attribute
Motivation
I remove the 'fill' and 'fillOpacity' properties so that I can change the colour when I want for most SVGs, however this doesn't work for certain SVGs
Example
Pitch
~Will attempt to implement it myself with a subsequent PR~ but thought other devs will probably need this some way or another
Couldn't easily figure out how to access the filename - will try to pick it up some time later