Parsing error when parsing reexport statement that exports a specifier that is not a valid identifier
Andarist opened this issue · comments
Mateusz Burzyński commented
Originally reported here but then I realized that the error was only thrown when this plugin was used
Repro
const { Parser } = require('acorn')
const { importAssertions } = require('acorn-import-assertions')
Parser
.extend(importAssertions)
.parse(`export * as '🙈' from 'external'`, { sourceType: 'module', ecmaVersion: 'latest' })
Actual
Uncaught [SyntaxError: Unexpected token (1:12)
] {
pos: 12,
loc: Position { line: 1, column: 12 },
raisedAt: 15
}
Expected
It should parse this input correctly
bojavou commented
There's an alternative with support.