File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,6 @@ const ESMODULES_TARGET = {
77 esmodules : true ,
88} ;
99
10- // silence Babel 7.13+ loose-with-assumptions warnings
11- const _warn = console . warn ;
12- console . warn = function ( m ) {
13- if ( / t h e " l o o s e : t r u e " o p t i o n / . test ( m ) ) {
14- return ;
15- }
16- // eslint-disable-next-line prefer-rest-params
17- return _warn . apply ( this , arguments ) ;
18- } ;
19-
2010const mergeConfigItems = ( babel , type , ...configItemsToMerge ) => {
2111 const mergedItems = [ ] ;
2212
@@ -116,9 +106,20 @@ export default () => {
116106 'transform-fast-rest' ,
117107 ] ,
118108 } ,
109+ // The following 3 plugins have `loose: false` as we instead use the
110+ // associated `assumptions`. Enabling `loose` causes some issues with other
111+ // class features plugins, so we replace it with the assumptions.
119112 {
120113 name : '@babel/plugin-transform-class-properties' ,
121- loose : true ,
114+ loose : false ,
115+ } ,
116+ {
117+ name : '@babel/plugin-transform-private-property-in-object' ,
118+ loose : false ,
119+ } ,
120+ {
121+ name : '@babel/plugin-transform-private-methods' ,
122+ loose : false ,
122123 } ,
123124 ! customOptions . modern &&
124125 ! isNodeTarget && {
You can’t perform that action at this time.
0 commit comments