File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ function resolveAliasPath(relativeToBabelConf) {
17
17
return `./${ resolvedPath . replace ( '\\' , '/' ) } ` ;
18
18
}
19
19
20
+ /** @type {babel.PluginItem[] } */
21
+ const productionPlugins = [
22
+ [ 'babel-plugin-react-remove-properties' , { properties : [ 'data-mui-test' ] } ] ,
23
+ ] ;
24
+
20
25
/** @type {babel.ConfigFunction } */
21
26
module . exports = function getBabelConfig ( api ) {
22
27
const useESModules = api . env ( [ 'regressions' , 'modern' , 'stable' ] ) ;
@@ -122,6 +127,9 @@ module.exports = function getBabelConfig(api) {
122
127
: [ ] ) ,
123
128
] ;
124
129
130
+ if ( process . env . NODE_ENV === 'production' ) {
131
+ plugins . push ( ...productionPlugins ) ;
132
+ }
125
133
if ( process . env . NODE_ENV === 'test' ) {
126
134
plugins . push ( [
127
135
'babel-plugin-module-resolver' ,
@@ -190,6 +198,7 @@ module.exports = function getBabelConfig(api) {
190
198
} ,
191
199
benchmark : {
192
200
plugins : [
201
+ ...productionPlugins ,
193
202
[
194
203
'babel-plugin-module-resolver' ,
195
204
{
You can’t perform that action at this time.
0 commit comments