jamsinclair / jSquash

Browser & Web Worker focussed wasm bundles derived from the Squoosh App.
Apache License 2.0
222 stars 14 forks source link

Export single thread only methods for codecs that have multi-threading. #33

Open jamsinclair opened 1 year ago

jamsinclair commented 1 year ago

Is your feature request related to a problem? Please describe.

There is a bug in Vite that prevents the compilation of multi-threaded code in the codecs (See #19). This may take a long time to be fixed.

In the interim the codecs can not be easily used in Vite and Nuxt projects without installing a separate package.

Describe the solution you'd like

The multi-threaded codecs, AVIF, JXL and oxipng could include a single-thread module that can be imported and be compatible with Vite and Nuxt Projects.

E.g.

import { optimise } from '@jsquash/oxipng/single-thread';

Describe alternatives you've considered N/A

jamsinclair commented 10 months ago

May want to prioritise this sooner as there's still no luck with Vite and multi-threaded modules (See last comment in #19)