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",
|
"destructuringPrivate",
|
||||||
"decoratorAutoAccessors",
|
"decoratorAutoAccessors",
|
||||||
"explicitResourceManagement",
|
"explicitResourceManagement",
|
||||||
["importAttributes", { deprecatedAssertSyntax: true }],
|
|
||||||
"sourcePhaseImports",
|
"sourcePhaseImports",
|
||||||
"deferredImportEvaluation",
|
"deferredImportEvaluation",
|
||||||
["optionalChainingAssign", { version: "2023-07" }],
|
["optionalChainingAssign", { version: "2023-07" }],
|
||||||
@@ -199,6 +198,15 @@ const allowedReasonCodes = new Set([
|
|||||||
"VarRedeclaration",
|
"VarRedeclaration",
|
||||||
"InvalidPrivateFieldResolution",
|
"InvalidPrivateFieldResolution",
|
||||||
"DuplicateExport",
|
"DuplicateExport",
|
||||||
|
|
||||||
|
/*
|
||||||
|
Legacy syntax
|
||||||
|
|
||||||
|
```js
|
||||||
|
import json from "./json.json" assert {type: "json"};
|
||||||
|
```
|
||||||
|
*/
|
||||||
|
"ImportAttributesUseAssert",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const babelParserOptionsCombinations = [appendPlugins(["jsx"])];
|
const babelParserOptionsCombinations = [appendPlugins(["jsx"])];
|
||||||
|
|||||||
Reference in new issue
Block a user