Comments (7)
@coderas sorry for the time without response. I think that actually what @jenniferlynparsons pointed makes a lot of sense, and I noticed that in the last release it is working fine.
It was probably related to the setup I guess.
Thanks for your time!
from babel-plugin-jsx-remove-data-test-id.
Hi, this should be down to your build configuration. The plugin doesn't really care about the file extension, so anytime babel is parsing your JSX, it should strip the attributes just fine.
from babel-plugin-jsx-remove-data-test-id.
Nice, maybe I've got some setup wrong, I've installed the plugin and checked it really stripped off the data-testis(react-testing-library) when I did build the project.
But as I ran than test suite, it broke most of tests by not find this same data-testid elements.
Do I have to setup something different?
I did installed it and add to the plugin list on Babel.rc.
Thanks again.
from babel-plugin-jsx-remove-data-test-id.
Do you have some config to look at?
Reopening, closed by accident!
from babel-plugin-jsx-remove-data-test-id.
It sounds a lot like you need a different setup for your test environment.
If you post your configs that might help us to take a look.
from babel-plugin-jsx-remove-data-test-id.
@viniciusavieira i had the same issue. i resolved it by limiting the plugin to the prod or dev environments only:
{
env: {
production: {
plugins: ["babel-plugin-jsx-remove-data-test-id"]
},
test: {
plugins: ["other-plugins"]
}
}
}
from babel-plugin-jsx-remove-data-test-id.
No worries, thanks for the thread!
from babel-plugin-jsx-remove-data-test-id.
Related Issues (17)
- How to use it with CRA? HOT 3
- enhancement HOT 2
- Readme doesn't give full picture of config requirements HOT 1
- Is there a way to use it with ts-loader? HOT 5
- data-id inside JSXExpressionContainer's value .... HOT 5
- Make plugin compatible with TypeScript
- Error | Cannot read property 'expression' of null HOT 1
- Add eslint/prettier HOT 1
- Add CI
- Cannot read property value of undefined HOT 4
- Re-implement functionality from #18 HOT 1
- It cannot detect attributes passed as properties HOT 2
- plugin doesnt remove "data-test-id" attribute HOT 11
- Doesn't remove data attribute
- Strip any attribute. Not only "data-test-id" HOT 2
- How can we do this only in production using Webpack? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-jsx-remove-data-test-id.