ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Deduplicate wasm binary in distribution

Đang mở
#535 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
C
Star
17.8k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**

`ffmpeg.wasm v0.12.1`

The wasm binary is duplicated into both `esm` and `umd` folders, inside `core/dist` making the final binary unnecessarily larger.

It would be great if we could consolidate these two, and have the js files reference them in the parent.

```console
(core/dist)$ tree -sh
[4.0K] .
├── [4.0K] esm
│ ├── [107K] ffmpeg-core.js
│ └── [ 30M] ffmpeg-core.wasm
└── [4.0K] umd
├── [107K] ffmpeg-core.js
└── [ 30M] ffmpeg-core.wasm

(core/dist)$ sha256sum esm/ffmpeg-core.wasm
5577137bc744cd19d1a0a12aa0d1b7ca314ad8e514e616c59f1428f60afdf059 esm/ffmpeg-core.wasm

(core/dist)$ sha256sum umd/ffmpeg-core.wasm
5577137bc744cd19d1a0a12aa0d1b7ca314ad8e514e616c59f1428f60afdf059 umd/ffmpeg-core.wasm
```

Observed this while updating dependencies that got bundled into a docker image. Seeing a near-50% increase in uncompressed image size. https://github.com/miraclx/freyr-js/pull/546

CleanShot 2023-08-08 at 00 29 46@2x

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.