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(
3737
3838 if ( existing ) {
3939 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+ ] ) ;
4147 } else {
4248 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+ ] ) ;
4456 }
4557
4658 await reloadTabsForContentScript ( contentScript ) ;
You can’t perform that action at this time.
0 commit comments