File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/wxt/src/virtual/utils Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,22 @@ export async function reloadManifestContentScriptMv3(
37
37
38
38
if ( existing ) {
39
39
logger . debug ( 'Updating content script' , existing ) ;
40
- await browser . scripting . updateContentScripts ( [ { ...contentScript , id } ] ) ;
40
+ await browser . scripting . updateContentScripts ( [
41
+ {
42
+ ...contentScript ,
43
+ id,
44
+ css : contentScript . css ?? [ ] ,
45
+ } ,
46
+ ] ) ;
41
47
} else {
42
48
logger . debug ( 'Registering new content script...' ) ;
43
- await browser . scripting . registerContentScripts ( [ { ...contentScript , id } ] ) ;
49
+ await browser . scripting . registerContentScripts ( [
50
+ {
51
+ ...contentScript ,
52
+ id,
53
+ css : contentScript . css ?? [ ] ,
54
+ } ,
55
+ ] ) ;
44
56
}
45
57
46
58
await reloadTabsForContentScript ( contentScript ) ;
You can’t perform that action at this time.
0 commit comments