wxt-dev / wxt-dev/wxt

when using PrimeIcons from PrimeVue in a content script, the icons display as garbled characters

Open
#1,737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pending-triage
Dominant language
TypeScript
Stars
10.5k
Forks
564
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

when using PrimeIcons from PrimeVue in a content script, the icons display as garbled characters

I imported import 'primeicons/primeicons.css' at the top of index.ts in the content script folder. I noticed that after running, wxt compiled the source file's .pi-search:before {content: "\e908";} into pi-search:before { content: ""; }. I suspect this is why the icon isn't rendering correctly.

wxt is converting all content in the content property to content: "". How can I resolve this issue?

Image

Image

Image

Image

Image

.pi-user:before { content: "\e939"; }
<span class="pi pi-user"></span>

Reproduction

"wxt": "^0.20.7"

Steps to reproduce

No response

System Info
"wxt": "^0.20.7"
Used Package Manager

npm

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the content script's index.ts and the imported primeicons/primeicons.css using WXT 0.20.7, then reproduce the reported conversion of CSS escape sequences such as \e908 into literal characters. Compare the generated CSS with the source and verify that PrimeIcons render correctly in the content script when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.