Skip to main content
@reticlehq/vite-plugin is one line in vite.config.ts that does the two things everyone forgets: injecting reticle.connect() and enabling source mapping. Install it if your app builds with Vite. On Next.js use @reticlehq/next instead; on any other bundler, wire @reticlehq/browser by hand. Apache 2.0. Depends on @babel/core, @reticlehq/babel-plugin and @reticlehq/core. Optional peer dependency: vite >= 4.

Install and use

The import specifier is @reticlehq/vite-plugin and the export is reticle. An old README documented @reticlehq/core/vite; that subpath has never existed in core’s exports map, and npx @reticlehq/core init is not a command either. The binary is reticle, from @reticlehq/server.

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:
Plus a dynamic import of your dev module if one exists. It looks for 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

A packaged Electron or Tauri renderer is a production build loaded from a custom protocol, so the default guards would refuse. This one flag drops apply: 'serve' and opts the connect call into production.

Desktop wiring in full

Including the Tauri CSP whose failure is completely silent.
Last modified on August 16, 2026