Skip to content

Commit 4f1776b

Browse files
aehardingaklinker1
andauthored
feat: Default to using use_dynamic_url: true for content script css files (#1993)
Co-authored-by: Aaron <[email protected]>
1 parent 38473b9 commit 4f1776b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/wxt/src/core/utils/__tests__/manifest.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ describe('Manifest Utils', () => {
747747
{
748748
matches: ['*://google.com/*'],
749749
resources: ['content-scripts/one.css'],
750+
use_dynamic_url: true,
750751
},
751752
]);
752753
});
@@ -830,6 +831,7 @@ describe('Manifest Utils', () => {
830831
{
831832
matches: ['*://play.google.com/*'],
832833
resources: ['content-scripts/one.css'],
834+
use_dynamic_url: true,
833835
},
834836
]);
835837
});
@@ -993,6 +995,7 @@ describe('Manifest Utils', () => {
993995
{
994996
resources: ['content-scripts/one.css'],
995997
matches: ['*://google.com/*'],
998+
use_dynamic_url: true,
996999
},
9971000
]);
9981001
});

packages/wxt/src/core/utils/manifest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ export function getContentScriptCssWebAccessibleResources(
553553

554554
resources.push({
555555
resources: [cssFile],
556+
use_dynamic_url: true,
556557
matches:
557558
script.options.matches?.map((matchPattern) =>
558559
stripPathFromMatchPattern(matchPattern),

0 commit comments

Comments
 (0)