import { buildRuntime, watchRequested } from '../../../waybetter/packages/waybetter/build/runtime.mjs'; // The X runtime, bundled by the framework (`waybetter/build`): `?inline` CSS as strings, other CSS // imports dropped (the injected UI adopts its stylesheet into a shadow root explicitly), and // English only for its own strings: `x.*` and the bundled plugins' `plugin.*` (the UI kit's `kit.*` // come from the framework catalog). Other languages arrive natively. const watch = watchRequested(); await buildRuntime({ watch, entry: 'src/inject/entry.tsx', outfile: 'src-tauri/x-runtime.js', catalog: 'locales/en.json', prefixes: ['x.', 'plugin.'], jsx: 'automatic', define: { 'process.env.NODE_ENV': '"production"' }, // Theme fonts are embedded as bytes (see src/inject/fonts.ts). loader: { '.woff2': 'base64' }, }); console.log(watch ? 'Watching X runtime.' : 'Built X runtime.');