Enable turbo for local development
This commit is contained in:
parent
eedd86efae
commit
d2893326d7
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "exif-photo-blog",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbo",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
|
||||
@ -4,21 +4,11 @@ import { cwd } from 'process';
|
||||
|
||||
const FONT_FAMILY_IBM_PLEX_MONO = 'IBMPlexMono';
|
||||
|
||||
const getFontData = async () => {
|
||||
let data;
|
||||
if (typeof fs !== 'undefined') {
|
||||
data = fs.readFileSync(path.join(
|
||||
cwd(),
|
||||
'/public/fonts/IBMPlexMono-Medium.ttf',
|
||||
));
|
||||
} else {
|
||||
data = await fetch(new URL(
|
||||
'/public/fonts/IBMPlexMono-Medium.ttf',
|
||||
import.meta.url,
|
||||
)).then(res => res.arrayBuffer());
|
||||
}
|
||||
return data;
|
||||
};
|
||||
const getFontData = async () =>
|
||||
fs.readFileSync(path.join(
|
||||
cwd(),
|
||||
'/public/fonts/IBMPlexMono-Medium.ttf',
|
||||
));
|
||||
|
||||
export const getIBMPlexMonoMedium = () => getFontData()
|
||||
.then(data => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user