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

support content_scripts[i].world in manifest #744

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/proud-dryers-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"rollup-plugin-chrome-extension": patch
"@crxjs/vite-plugin": patch
---

support content_scripts[i].world in manifest
9 changes: 9 additions & 0 deletions packages/rollup-plugin/schema/manifest-v3.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@
"description": "Controls when the files in js are injected.",
"enum": ["document_start", "document_end", "document_idle"],
"type": "string"
},
"world": {
"type": "string",
"description": "The JavaScript world for a script to execute within.",
"enum": [
"ISOLATED",
"MAIN"
],
"default": "ISOLATED"
}
},
"required": ["matches"],
Expand Down
1 change: 1 addition & 0 deletions packages/vite-plugin/src/node/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export interface ManifestV3 {
match_about_blank?: boolean | undefined
include_globs?: string[] | undefined
exclude_globs?: string[] | undefined
world: "ISOLATED" | "MAIN"
}[]
| undefined
content_security_policy?: {
Expand Down
9 changes: 9 additions & 0 deletions schema/manifest-v3.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@
"document_idle"
],
"type": "string"
},
"world": {
"type": "string",
"description": "The JavaScript world for a script to execute within.",
"enum": [
"ISOLATED",
"MAIN"
],
"default": "ISOLATED"
}
},
"required": ["matches"],
Expand Down
Loading