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

fix(dev): strip utf-8 bom #814

Merged
merged 1 commit into from Sep 19, 2020
Merged

fix(dev): strip utf-8 bom #814

merged 1 commit into from Sep 19, 2020

Conversation

underfin
Copy link
Member

fix #806

@antfu antfu merged commit ed2afe6 into vitejs:master Sep 19, 2020
@underfin underfin deleted the strip-utf8-bom branch September 19, 2020 11:04
@Aaron-Pool
Copy link

Aaron-Pool commented Mar 1, 2021

@antfu @underfin

Just an FYI, this issue has reemerged in the vite 2.0 importAnalysis plugin. Apparently es-module-lexer doesn't strip the character either, so if the line begins with a Bom character, the line linked below won't return the first import

imports = parseImports(source)[0]

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 this pull request may close these issues.

UTF-8 with BOM files cause vite to fail rewrite import
3 participants