You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce any option to allow remove attributes for any component name
Motivation
We use data-testid attributes on the project, to test our components, but we need to remove this attribute for production.
I've found package https://www.npmjs.com/package/@svgr/babel-plugin-remove-jsx-attribute that allow to remove attributes by name, but it requires to provide all components names on the project where attributes must be deleted.
We need to delete specified attributes for any components.
Example
It could be implemented with option in .babelrc like that
🚀 Feature Proposal
Introduce any option to allow remove attributes for any component name
Motivation
We use
data-testid
attributes on the project, to test our components, but we need to remove this attribute for production.I've found package https://www.npmjs.com/package/@svgr/babel-plugin-remove-jsx-attribute that allow to remove attributes by name, but it requires to provide all components names on the project where attributes must be deleted.
We need to delete specified attributes for any components.
Example
It could be implemented with option in
.babelrc
like thatPitch
Package https://www.npmjs.com/package/@svgr/babel-plugin-remove-jsx-attribute already exists and enough popular. It would be nice to add so small feature, instead of create one more yet package in NPM and do the same work over and over.
To implement this feature we probably need change couple lines in docs and one in code here
svgr/packages/babel-plugin-remove-jsx-attribute/src/index.ts
Line 12 in 0ae0413
The text was updated successfully, but these errors were encountered: