Skip to content

Commit e23db04

Browse files
1natsu172aklinker1
andcommitted
fix: missing browser in shadow-root file (#1317)
Co-authored-by: Aaron <[email protected]>
1 parent af94dc1 commit e23db04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/wxt/src/utils/content-script-ui/shadow-root.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/** @module wxt/utils/content-script-ui/shadow-root */
2+
import { browser } from 'wxt/browser';
23
import { ContentScriptContext } from '../content-script-context';
34
import type { ContentScriptUi, ContentScriptUiOptions } from './types';
45
import { createIsolatedElement } from '@webext-core/isolated-element';
@@ -91,10 +92,9 @@ export async function createShadowRootUi<TMounted>(
9192
* Load the CSS for the current entrypoint.
9293
*/
9394
async function loadCss(): Promise<string> {
94-
// @ts-expect-error: getURL is defined per-project, but not inside the package
95-
const url = browser.runtime.getURL(
96-
`/content-scripts/${import.meta.env.ENTRYPOINT}.css`,
97-
);
95+
const url = browser.runtime
96+
// @ts-expect-error: getURL is defined per-project, but not inside the package
97+
.getURL(`/content-scripts/${import.meta.env.ENTRYPOINT}.css`);
9898
try {
9999
const res = await fetch(url);
100100
return await res.text();

0 commit comments

Comments
 (0)