fix fonts
Release Firefox and Chromium extensions / Package and attach browser extensions (release) Successful in 4s
Release Firefox and Chromium extensions / Package and attach browser extensions (release) Successful in 4s
This commit is contained in:
@@ -192,6 +192,17 @@ async function packageExtension({
|
||||
for (const relativePath of archiveFiles) {
|
||||
let contents = await readFile(path.join(rootDirectory, relativePath));
|
||||
|
||||
if (target === "chromium" && relativePath === "content.css") {
|
||||
contents = Buffer.from(
|
||||
contents
|
||||
.toString("utf8")
|
||||
.replaceAll(
|
||||
'url("fonts/',
|
||||
'url("chrome-extension://__MSG_@@extension_id__/fonts/'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (relativePath === "manifest.json") {
|
||||
const manifest = createManifest(contents, version, target);
|
||||
contents = Buffer.from(`${JSON.stringify(manifest, null, 2)}\n`);
|
||||
|
||||
Reference in New Issue
Block a user