Skip to content

Commit 2b5caf3

Browse files
committed
fix: Update default babel options
1 parent 1f8716a commit 2b5caf3

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

src/babelParser.ts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,21 @@ function getDefaultPlugins(
1818
TYPESCRIPT_EXTS[path.extname(options.filename || '')]
1919
? 'typescript'
2020
: 'flow',
21-
'asyncGenerators',
22-
'bigInt',
23-
'classProperties',
24-
'classPrivateProperties',
25-
'classPrivateMethods',
21+
'asyncDoExpressions',
22+
'decimal',
2623
['decorators', { decoratorsBeforeExport: false }],
24+
'decoratorAutoAccessors',
25+
'destructuringPrivate',
2726
'doExpressions',
28-
'dynamicImport',
2927
'exportDefaultFrom',
30-
'exportNamespaceFrom',
3128
'functionBind',
32-
'functionSent',
33-
'importMeta',
34-
'logicalAssignment',
35-
'nullishCoalescingOperator',
36-
'numericSeparator',
37-
'objectRestSpread',
38-
'optionalCatchBinding',
39-
'optionalChaining',
29+
'importAssertions',
30+
'moduleBlocks',
31+
'partialApplication',
4032
['pipelineOperator', { proposal: 'minimal' }],
33+
['recordAndTuple', { syntaxType: 'bar' }],
34+
'regexpUnicodeSets',
4135
'throwExpressions',
42-
'topLevelAwait',
4336
];
4437
}
4538

@@ -84,6 +77,8 @@ function buildOptions(
8477
const plugins = buildPluginList(parserOptions, babelOptions);
8578

8679
return {
80+
sourceType: 'unambiguous',
81+
tokens: false,
8782
...(parserOptions || {}),
8883
plugins,
8984
};

0 commit comments

Comments
 (0)