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

CSS with encoding UTF-8 with BOM generates \feff #10043

Closed
7 tasks done
daveychu opened this issue Sep 8, 2022 · 0 comments · Fixed by #10577
Closed
7 tasks done

CSS with encoding UTF-8 with BOM generates \feff #10043

daveychu opened this issue Sep 8, 2022 · 0 comments · Fixed by #10577
Labels
inconsistency Inconsistency between dev & build p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@daveychu
Copy link

daveychu commented Sep 8, 2022

Describe the bug

I'm including multiple .css files via link
What I expect is that npm run dev and npm run build && npm run preview have the same styling
What actually happens is that the first entry in the second .css file breaks because Vite generates \feff in the output

Reproduction

https://github.com/daveychu/vite-css-utf-8-with-bom-bug

Run npm run dev -> Red text
Run npm run build && npm run preview -> Not red text
See dist\assets\*.css for \feff

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz     
    Memory: 5.14 GB / 15.95 GB
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.27)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vite: ^3.1.0 => 3.1.0

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Sep 9, 2022
@bluwy bluwy added the inconsistency Inconsistency between dev & build label Sep 13, 2022
sapphi-red added a commit to sapphi-red/vite that referenced this issue Oct 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
inconsistency Inconsistency between dev & build p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants