Main World Content Script not working on localhost

I've created an extension using plasmo, with default code
export const config: PlasmoCSConfig = {
matches: ["<all_urls>"],
world: "MAIN"
}
console.log(
"You may find that having is not so pleasing a thing as wanting. This is not logical, but it is often true."
)
export const config: PlasmoCSConfig = {
matches: ["<all_urls>"],
world: "MAIN"
}
console.log(
"You may find that having is not so pleasing a thing as wanting. This is not logical, but it is often true."
)
When the world is set to MAIN i don't get the console.log on localhost, it works on any other url, but if i use it in ISOLATED world it works. Anyone knows the solution? I am using a react app with vite
Solution:
Solved Was able to solve it by modifying the manifest in package json. Updated manifest : ``` "manifest": { "host_permissions": [...
Jump to solution
1 Reply
Solution
Saqlain
Saqlain•6mo ago
Solved Was able to solve it by modifying the manifest in package json. Updated manifest :
"manifest": {
"host_permissions": [
"https://*/*",
"http://*/*"
]
}
"manifest": {
"host_permissions": [
"https://*/*",
"http://*/*"
]
}
Basically added http in host_permissions, it was https only by default.
Want results from more Discord servers?
Add your server