mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-26 01:12:42 +03:00
fix: selfhost build (#5833)
This commit is contained in:
parent
d665eaec34
commit
28ee66173e
@ -3,7 +3,7 @@ import { join } from 'node:path';
|
|||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||||
import { DEFAULT_CANVAS_TEXT_FONT_CONFIG } from '@blocksuite/blocks/dist/surface-block/consts.js';
|
import { CanvasTextFonts } from '@blocksuite/blocks/dist/surface-block/consts.js';
|
||||||
|
|
||||||
const fontPath = join(
|
const fontPath = join(
|
||||||
fileURLToPath(import.meta.url),
|
fileURLToPath(import.meta.url),
|
||||||
@ -17,7 +17,7 @@ const fontPath = join(
|
|||||||
);
|
);
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
DEFAULT_CANVAS_TEXT_FONT_CONFIG.map(async ({ url }) => {
|
CanvasTextFonts.map(async ({ url }) => {
|
||||||
const buffer = await fetch(url).then(res =>
|
const buffer = await fetch(url).then(res =>
|
||||||
res.arrayBuffer().then(res => Buffer.from(res))
|
res.arrayBuffer().then(res => Buffer.from(res))
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user