Skip to content

Commit

Permalink
build: remove wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
flamrdevs committed Feb 19, 2025
1 parent e0a716d commit 019068a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"tsup": "8.3.6",
"tsx": "4.19.3",
"typescript": "5.7.3",
"valibot": "1.0.0-rc.1",
"yoga-wasm-web": "0.3.3"
"valibot": "1.0.0-rc.1"
},
"peerDependencies": {
"lucide": "0.475.0",
Expand All @@ -35,5 +34,5 @@
"optional": true
}
},
"packageManager": "pnpm@9.15.4"
"packageManager": "pnpm@10.2.0"
}
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed public/assets/yoga.wasm
Binary file not shown.
7 changes: 2 additions & 5 deletions src/libs/image.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import fs from 'node:fs/promises';

import satori, { init } from 'satori/wasm';
import type { Font } from 'satori/wasm';

import yoga from 'yoga-wasm-web';
import satori from 'satori';
import type { Font } from 'satori';

type Tag = 'div' | 'span' | 'svg' | (string & {});

Expand Down Expand Up @@ -114,7 +112,6 @@ type RootComponent<P extends {} = {}> = (props: P) => RootElement;

type SVGFunction = (element: RootElement) => Promise<string>;

init(await yoga((await fs.readFile('./assets/yoga.wasm')).buffer));
const font = async (name: Font['name'], path: string, style: Font['style'], weight: Font['weight']): Promise<Font> => ({
name,
style,
Expand Down

0 comments on commit 019068a

Please sign in to comment.