when using PrimeIcons from PrimeVue in a content script, the icons display as garbled characters
Nobody has claimed this yet.
- 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?
.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
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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