You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Run react render server in a new mode. (#6)
Run react render server in a new mode.
More component can now be rendered in `SSR`.
---------
Co-authored-by: Jonathan Gao <gsmlg.com@gmail.com>
feat: Support build in roduction mode. (#5)
## Run in release mode
Bundle components with server.js to one file.
```shell
mix phx.react.bun.bundle --component-base=assets/component --output=priv/react/server.js
```
Config `runtime` to `Phoenix.React.Runtime.Bun` in `runtime.exs`
```elixir
config :phoenix_react_server, Phoenix.React.Runtime.Bun,
cmd: System.find_executable("bun"),
server_js: Path.expand("../priv/react/server.js", __DIR__),
env: :prod
```
---------
Co-authored-by: Jonathan Gao <gsmlg.com@gmail.com>