File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
packages/babel-preset-base Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ describe('preset in module', () => {
71
71
noImportMeta : true ,
72
72
noClassProperties : true ,
73
73
noJsonStrings : true ,
74
+ noRuntime : true ,
74
75
} ) ;
75
- expect ( plugins ) . toHaveLength ( 1 ) ;
76
+ expect ( plugins ) . toHaveLength ( 0 ) ;
76
77
} ) ;
77
78
78
79
describe ( 'for @babel/preset-env' , ( ) => {
Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ export const preset = (opts: PresetOptions | null = {}) => {
74
74
{ loose : false } ,
75
75
] ,
76
76
noJsonStrings : '@babel/plugin-proposal-json-strings' ,
77
+ noRuntime : [
78
+ '@babel/plugin-transform-runtime' ,
79
+ {
80
+ corejs : false ,
81
+ helpers : true ,
82
+ regenerator : true ,
83
+ useESModules : true ,
84
+ } ,
85
+ ] ,
77
86
} ;
78
87
// Add them, only if user hasn't explicitly disabled it
79
88
Object . keys ( wannabePlugins ) . forEach ( ( pKey : string ) => {
@@ -82,18 +91,6 @@ export const preset = (opts: PresetOptions | null = {}) => {
82
91
}
83
92
} ) ;
84
93
85
- // We include @babel /plugin-transform-runtime by default in order to
86
- // properly transform e.g. async/await
87
- plugins . push ( [
88
- '@babel/plugin-transform-runtime' ,
89
- {
90
- corejs : false ,
91
- helpers : true ,
92
- regenerator : true ,
93
- useESModules : true ,
94
- } ,
95
- ] ) ;
96
-
97
94
// Return the preset and some of stage-3 plugins
98
95
// We will remove them, once it becomes stage-4, i.e included in preset-env
99
96
return {
You can’t perform that action at this time.
0 commit comments