Update babel parse options for import assertions support (#16810)
This commit is contained in:
1 parent
3e4b452b4a
commit
c5648f7df7
1 file changed
+9
-1
@@ -42,7 +42,6 @@ const parseOptions = {
|
||||
"destructuringPrivate",
|
||||
"decoratorAutoAccessors",
|
||||
"explicitResourceManagement",
|
||||
["importAttributes", { deprecatedAssertSyntax: true }],
|
||||
"sourcePhaseImports",
|
||||
"deferredImportEvaluation",
|
||||
["optionalChainingAssign", { version: "2023-07" }],
|
||||
@@ -199,6 +198,15 @@ const allowedReasonCodes = new Set([
|
||||
"VarRedeclaration",
|
||||
"InvalidPrivateFieldResolution",
|
||||
"DuplicateExport",
|
||||
|
||||
/*
|
||||
Legacy syntax
|
||||
|
||||
```js
|
||||
import json from "./json.json" assert {type: "json"};
|
||||
```
|
||||
*/
|
||||
"ImportAttributesUseAssert",
|
||||
]);
|
||||
|
||||
const babelParserOptionsCombinations = [appendPlugins(["jsx"])];
|
||||
|
||||
Reference in new issue
Block a user