LiveViewReact.SSR.ViteJS (liveview_react v1.0.0)

Copy Markdown View Source

Implements SSR by making a POST request to http://{:vite_host}/ssr_render.

ssr_render is implemented as a Vite plugin. You have to add it to the vite.config.js plugins section.

Requests use bounded timeouts. Override the millisecond defaults with positive integers when development infrastructure needs different limits:

config :liveview_react,
  vite_connect_timeout: 2_000,
  vite_request_timeout: 5_000
import liveViewReactPlugin from "liveview_react/vite";

{
  publicDir: "static",
  plugins: [react(), liveViewReactPlugin()],
  // ...
}

Summary

Functions

A handy utility returning path relative to Vite JS host.

Functions

vite_path(path)

A handy utility returning path relative to Vite JS host.