Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.1 fails with export specifier in string #148

Closed
bluwy opened this issue Feb 22, 2023 · 1 comment · Fixed by #149
Closed

v1.1.1 fails with export specifier in string #148

bluwy opened this issue Feb 22, 2023 · 1 comment · Fixed by #149

Comments

@bluwy
Copy link

bluwy commented Feb 22, 2023

In v1.1.1, es-module-lexer errors when parsing these valid JS code:

export default "export default a"
export default "export default 'a'"
export default "export function foo() {}"
export default "export function foo() {return bar}"

Here's a stackblitz repro, installing v1.1.0 instead fixes the issue. From the patterns, it looks like it's parsing the export specifier within the string.

Stumbled upon this in Vite: vitejs/vite#12036

@guybedford
Copy link
Owner

Thanks for reporting, fix in #149.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants