Skip to content

Commit

Permalink
build: remove data-testid from production (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra authored Jan 20, 2021
1 parent 8933d29 commit 7591816
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module.exports = function (api) {
const plugins = [
"@chakra-ui/babel-plugin",
"@babel/plugin-proposal-class-properties",
isBuild
? [
"babel-plugin-jsx-remove-data-test-id",
{ attributes: ["data-testid"] },
]
: {},
];

return {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-jsx-remove-data-test-id": "^2.1.3",
"concurrently": "^5.3.0",
"conventional-github-releaser": "^3.1.5",
"cross-env": "^7.0.3",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3742,6 +3742,11 @@ babel-plugin-jest-hoist@^26.6.2:
"@types/babel__core" "^7.0.0"
"@types/babel__traverse" "^7.0.6"

babel-plugin-jsx-remove-data-test-id@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/babel-plugin-jsx-remove-data-test-id/-/babel-plugin-jsx-remove-data-test-id-2.1.3.tgz#d4e5fc89e85907b608f3d9b0964e5c0f1ad507e1"
integrity sha512-FTpcmzr3avLVStllCT4BceTTZNEb+1mJVtLpsicvXDqjojEkyrga1GGOxWj768Ra3tev6KWgNOhZ/Lrucb+MuQ==

babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138"
Expand Down

1 comment on commit 7591816

@vercel
Copy link

@vercel vercel bot commented on 7591816 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.