Parse string export names by default (moduleStringNames) (#13195)
* Parse string epxort names by default (`moduleStringNames`) * Remove remaining references
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": [
|
||||
"moduleStringNames"
|
||||
],
|
||||
"throws": "A string literal cannot be used as an imported binding.\n- Did you mean `import { \"foo\" as foo }`? (1:9)"
|
||||
}
|
||||
}
|
||||
3
packages/babel-parser/test/fixtures/es2022/module-string-names/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/es2022/module-string-names/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"sourceType": "module"
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
export { foo as "some exports" };
|
||||
var foo;
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'moduleStringNames' (1:16)",
|
||||
"sourceType": "module",
|
||||
"plugins": []
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
import { "foo" as bar, "default" as qux } from "module-a";
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'moduleStringNames' (1:9)",
|
||||
"sourceType": "module",
|
||||
"plugins": []
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["moduleStringNames"]
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": [
|
||||
"moduleStringNames",
|
||||
"flow"
|
||||
],
|
||||
"plugins": ["flow"],
|
||||
"throws": "A string literal cannot be used as an imported binding.\n- Did you mean `import { \"foo\" as foo }`? (1:9)"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["flow", "moduleStringNames"]
|
||||
"plugins": ["flow"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user