Add support for "content.svelte" content scripts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 564
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request
In Svelte 5 it's possible to use "svelte.{js,ts}" extension files to use svelte runes inside, however when trying this in WXT as "test.content.svelte.{js,ts}" it outputs the correct file, but content script not runs in the browser and producing "Unchecked runtime.lastError: The message port closed before a response was received." error
This would be useful in case Svelte props should be amended at runtime. As in my case when I am kinda trying to catch Adobe Analytics analytics request and display it on the page
Is your feature request related to a bug?
N/A
What are the alternatives?
To use legacy Svelte API, but they will be removed in the future
Additional context
https://svelte.dev/docs/svelte/svelte-js-files
Unchecked runtime.lastError: The message port closed before a response was received.
generic-67DrFc4U.mjs:32 Uncaught (in promise) Error: No response
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 by tracing how WXT processes test.content.svelte.{js,ts} content-script entry points and compare that path with regular content scripts. Reproduce the browser failure, then verify that a Svelte 5 content script runs successfully without the message-port error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100