(config, { customOptions })
| 65 | }, |
| 66 | |
| 67 | config(config, { customOptions }) { |
| 68 | const targets = customOptions.targets; |
| 69 | const isNodeTarget = targets && targets.node != null; |
| 70 | |
| 71 | const defaultPlugins = createConfigItems( |
| 72 | babelCore, |
| 73 | 'plugin', |
| 74 | [ |
| 75 | { |
| 76 | name: '@babel/plugin-syntax-import-meta', |
| 77 | }, |
| 78 | !customOptions.jsxImportSource && { |
| 79 | name: '@babel/plugin-transform-react-jsx', |
| 80 | pragma: customOptions.pragma || 'h', |
| 81 | pragmaFrag: customOptions.pragmaFrag || 'Fragment', |
| 82 | }, |
| 83 | !customOptions.typescript && { |
| 84 | name: '@babel/plugin-transform-flow-strip-types', |
| 85 | }, |
| 86 | isTruthy(customOptions.defines) && { |
| 87 | name: 'babel-plugin-transform-replace-expressions', |
| 88 | replace: customOptions.defines, |
| 89 | }, |
| 90 | !customOptions.modern && |
| 91 | !isNodeTarget && { |
| 92 | name: 'babel-plugin-transform-async-to-promises', |
| 93 | inlineHelpers: true, |
| 94 | externalHelpers: false, |
| 95 | minify: true, |
| 96 | }, |
| 97 | !customOptions.modern && |
| 98 | !isNodeTarget && { |
| 99 | value: [ |
| 100 | transformFastRest, |
| 101 | { |
| 102 | // Use inline [].slice.call(arguments) |
| 103 | helper: false, |
| 104 | literal: true, |
| 105 | }, |
| 106 | 'transform-fast-rest', |
| 107 | ], |
| 108 | }, |
| 109 | { |
| 110 | name: '@babel/plugin-proposal-class-properties', |
| 111 | loose: true, |
| 112 | }, |
| 113 | !customOptions.modern && |
| 114 | !isNodeTarget && { |
| 115 | name: '@babel/plugin-transform-regenerator', |
| 116 | async: false, |
| 117 | }, |
| 118 | { |
| 119 | name: 'babel-plugin-macros', |
| 120 | }, |
| 121 | ].filter(Boolean), |
| 122 | ); |
| 123 | |
| 124 | const babelOptions = config.options || {}; |
nothing calls this directly
no test coverage detected
searching dependent graphs…