Skip to content

In watch mode chrome extension csp is not copied properly. #10214

@dailypixie

Description

@dailypixie

🐛 bug report

"build": "parcel build src/manifest.json --config @parcel/config-webextension",
"watch": "parcel watch src/manifest.json --config @parcel/config-webextension",

In watch mode the csp is not copied properly. Its working properly in build mode. Windows machine with node 22
I have to always copy in the dist manifest the 'wasm-unsafe-eval': "content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval' http://localhost:;"
},
source: {
"manifest_version": 3,
"name": "MLCBot",
"version": "0.1.1",
"description": "Chat with your history",
"icons": {
"16": "icons/icon-16.png",
"32": "icons/icon-32.png",
"64": "icons/icon-64.png",
"128": "icons/icon-128.png"
},
"content_security_policy": {
"extension_pages": "script-src 'self' 'wasm-unsafe-eval' http://localhost:
;"
},
"action": {
"default_title": "MLCBot",
"default_popup": "popup.html"
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"content.ts"
]
}
],
"permissions": [
"storage",
"tabs",
"offscreen",
"webNavigation",
"activeTab",
"scripting",
"history"
],
"host_permissions": [
"http:///",
"https://
/"
],
"background": {
"service_worker": "./background/background.ts",
"type": "module"
}
}
dist:
{
"manifest_version": 3,
"name": "MLCBot",
"version": "0.1.1",
"description": "Chat with your history",
"icons": {
"16": "icon-16.7d70c091.png",
"32": "icon-32.2b39576e.png",
"64": "icon-64.70e1b04c.png",
"128": "icon-128.0edb1549.png"
},
"content_security_policy": {
"extension_pages": "script-src 'self' http://localhost:;"
},
"action": {
"default_title": "MLCBot",
"default_popup": "popup.936391bd.html"
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"content.00b06dae.js",
"autoreload.8b981e35.js"
],
"css": []
}
],
"permissions": [
"storage",
"tabs",
"offscreen",
"webNavigation",
"activeTab",
"scripting",
"history"
],
"host_permissions": [
"http://
/",
"https://*/",
"<all_urls>"
],
"background": {
"service_worker": "background.ea51a826.js"
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions