| 1 | import presetStage2 from "./preset-stage-2"; |
| 2 | import * as babelPlugins from "./generated/plugins"; |
| 3 | |
| 4 | export default (_: any, opts: any = {}) => { |
| 5 | const { |
| 6 | loose = false, |
| 7 | useBuiltIns = false, |
| 8 | decoratorsLegacy, |
| 9 | decoratorsVersion, |
| 10 | decoratorsBeforeExport, |
| 11 | pipelineProposal, |
| 12 | pipelineTopicToken, |
| 13 | recordAndTupleSyntax, |
| 14 | } = opts; |
| 15 | |
| 16 | return { |
| 17 | presets: [ |
| 18 | [ |
| 19 | presetStage2, |
| 20 | { |
| 21 | loose, |
| 22 | useBuiltIns, |
| 23 | decoratorsLegacy, |
| 24 | decoratorsVersion, |
| 25 | decoratorsBeforeExport, |
| 26 | pipelineProposal, |
| 27 | pipelineTopicToken, |
| 28 | recordAndTupleSyntax, |
| 29 | }, |
| 30 | ], |
| 31 | ], |
| 32 | plugins: [ |
| 33 | babelPlugins.syntaxDecimal, |
| 34 | babelPlugins.proposalExportDefaultFrom, |
| 35 | babelPlugins.proposalDoExpressions, |
| 36 | ], |
| 37 | }; |
| 38 | }; |