@reticlehq/vite-plugin does the two things everyone forgets: wiring the SDK, and enabling source mapping.
Version 2.8.0. Apache 2.0. Depends on @babel/core, @reticlehq/babel-plugin and @reticlehq/core. Optional peer dependency: vite >= 4.
Install and use
Why it exists
apply: 'serve' means it never reaches a production build. That is the guarantee that lets you leave it in the config permanently: there is no way to ship Reticle to your users by forgetting to remove a line.
What it injects
A virtual module at/@reticle-connect, added to the HTML, whose contents are:
src/reticle-dev.ts, .js, .tsx or .jsx, in that order, and leaves the file alone if you have one: that file is yours to edit.
Options
reticle(options?: ReticleVitePluginOptions): ReticleVitePlugin. Every option is optional.
Other exports
Types:
ReticleVitePluginOptions, ReticleVitePlugin, ViteDevServerLike.
Desktop
apply: 'serve' and opts the connect call into production.
Desktop wiring in full
Including the Tauri CSP whose failure is completely silent.