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', () => {
7171 noImportMeta : true ,
7272 noClassProperties : true ,
7373 noJsonStrings : true ,
74+ noRuntime : true ,
7475 } ) ;
75- expect ( plugins ) . toHaveLength ( 1 ) ;
76+ expect ( plugins ) . toHaveLength ( 0 ) ;
7677 } ) ;
7778
7879 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 = {}) => {
7474 { loose : false } ,
7575 ] ,
7676 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+ ] ,
7786 } ;
7887 // Add them, only if user hasn't explicitly disabled it
7988 Object . keys ( wannabePlugins ) . forEach ( ( pKey : string ) => {
@@ -82,18 +91,6 @@ export const preset = (opts: PresetOptions | null = {}) => {
8291 }
8392 } ) ;
8493
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-
9794 // Return the preset and some of stage-3 plugins
9895 // We will remove them, once it becomes stage-4, i.e included in preset-env
9996 return {
You can’t perform that action at this time.
0 commit comments