Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.30.3](https://github.com/rodrigogs/whats-reader/compare/v1.30.2...v1.30.3) (2026-04-03)


### Performance Improvements

* swap ONNX Runtime JSEP WASM for CPU-only variant ([3014cbd](https://github.com/rodrigogs/whats-reader/commit/3014cbdd6e3aa44ed080e46dbc9583d510e9f75f))

## [1.30.2](https://github.com/rodrigogs/whats-reader/compare/v1.30.1...v1.30.2) (2026-04-03)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "whats-reader",
"productName": "WhatsApp Backup Reader",
"version": "1.30.2",
"version": "1.30.3",
"description": "A desktop app to read and visualize WhatsApp chat exports",
"license": "AGPL-3.0",
"author": {
Expand Down
29 changes: 27 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
import { readFileSync } from 'node:fs';
import { copyFileSync, readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { paraglideVitePlugin } from '@inlang/paraglide-js';
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import { defineConfig, type Plugin } from 'vite';

// Read version from package.json at build time
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'));

// Replace the ONNX Runtime JSEP WASM (21MB, includes unused WebGPU/WebNN)
// with the CPU-only variant (11MB). Safe because the transcription worker
// uses device: 'wasm' exclusively — GPU backends are never initialized.
function ortWasmOptimize(): Plugin {
const src = resolve(
'node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.wasm',
);
const dests = [
resolve(
'node_modules/@huggingface/transformers/dist/ort-wasm-simd-threaded.jsep.wasm',
),
resolve(
'node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.wasm',
),
];
return {
name: 'ort-wasm-optimize',
buildStart() {
for (const dest of dests) copyFileSync(src, dest);
},
};
}

export default defineConfig({
// Inject version at build time
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
plugins: [
ortWasmOptimize(),
paraglideVitePlugin({
project: './project.inlang',
outdir: './src/lib/paraglide',
Expand Down
Loading