Switch to `@resvg/resvg-wasm` for `generate-images` (#35415)
Use the WASM module of [`resvg-js`](https://github.com/thx/resvg-js) to replace `fabric` and the problematic native `canvas` dependency. WASM works cross-platform so we can include it in the main `package.json`.pull/35399/head^2
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 13 KiB |
@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "gitea-tools",
|
||||
"version": "1.0.0",
|
||||
"description": "Build tools for Gitea",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"fabric": "^6.7.1",
|
||||
"svgo": "^4.0.0",
|
||||
"fast-glob": "^3.3.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"canvas": "^3.2.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": ["canvas"],
|
||||
"overrides": {
|
||||
"canvas": "3.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||