Skip to content

fix: support spread properties in defineContentScript#2420

Open
YashNayakk wants to merge 1 commit into
wxt-dev:mainfrom
YashNayakk:add-yash
Open

fix: support spread properties in defineContentScript#2420
YashNayakk wants to merge 1 commit into
wxt-dev:mainfrom
YashNayakk:add-yash

Conversation

@YashNayakk

Copy link
Copy Markdown

Summary

Fixes #2400.

When defineContentScript contains spread properties, the transform code crashes because spread elements do not have a key property.

This change safely handles spread properties and adds a regression test to verify that spread properties are preserved while the main field is removed.

@YashNayakk YashNayakk requested a review from aklinker1 as a code owner June 17, 2026 08:35
@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 5382ad0
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a325c44938e320008592736
😎 Deploy Preview https://deploy-preview-2420--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow spreading config into defineContentScript

1 participant