Files
wallet/ui/vite.config.ts
grenadeandClaude Fable 5.1 257b021066
ci / gate (push) Successful in 4m24s
feat: scaffold the workspace, the tauri shell and the webview
The house shape (architecture/generic.md §1): wallet-entities for the
vocabulary and the IPC wire types, wallet-core for the four ports that are the
architecture (KeyScheme, ChainAdapter, SwapProvider, FiatRamp), wallet-data
for the adapters that will implement them, and wallet-app as a Tauri 2 shell
whose commands are one-line shims. The webview is Vite + React + TypeScript
and reaches Rust only through ui/src/api/wallet.ts, typed by what ts-rs
exports from the entities crate on every `cargo test`.

Amounts are integer base units plus decimals, serialised as strings, because
the webview has no integer wide enough and a wallet that rounds is a wallet
that lies. The webview never receives a secret; readme.md and CLAUDE.md say
why and what will bite.

Two things the scaffold learned: Tauri's `version` field takes a JSON file or
a literal, never Cargo.toml, so the release workflow stamps it; and Prettier
must skip the generated types, which carry ts-rs's own style.

Placeholder icon; the mark comes later. CI targets the rust-gtk3 runner.

Refs #1

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ftBXYuba8ARhQeF74oUgW
2026-09-15 15:42:28 +03:00

23 lines
696 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
// The built output is embedded in the Tauri binary; there is no web server and
// no Node.js at runtime. `pnpm dev` serves it to the dev window on :5173.
export default defineConfig({
plugins: [react()],
// Tauri prints its own output; a cleared screen hides it.
clearScreen: false,
server: {
port: 5173,
// Tauri expects exactly this port; failing beats silently moving.
strictPort: true,
watch: { ignored: ['**/target/**'] },
},
// Only variables Tauri itself sets reach the bundle.
envPrefix: ['VITE_', 'TAURI_ENV_'],
build: {
target: 'es2022',
sourcemap: true,
},
})