jorvel
v0.3.0
Published
JORVEL command-line tool: scaffold, dev, build, federation, SSR, deploy, and diagnostics for module federation workspaces.
Downloads
31
Maintainers
Readme
jorvel
Early JORVEL CLI.
Local development
This repo uses workspaces. Build the CLI:
pnpm -C packages/cli build
Run without installing globally:
pnpm -C packages/cli dev -- --help
Commands
jorvel init <name>: create a new JORVEL workspacejorvel generate host <name>: scaffold a Rspack+React host app underapps/<name>jorvel generate remote <name>: scaffold a Rspack+React remote app underapps/<name>jorvel dev: runpnpm devfor all generated apps (those that havejorvel.app.json)jorvel build: runpnpm buildfor all generated apps (those that havejorvel.app.json)jorvel federation: generate starterjorvel.federation.jsonfiles for each app (host getsremotes, remotes getexposes)
Dev server orchestration
jorvel dev --proxy-remotes
Rewrites the hosts remotes list to same-origin URLs and writes jorvel.federation.proxy.json for the host.
The generated host rspack.config.mjs includes dev-server proxy rules that forward:
/jorvel/remotes/<remoteName>/* -> http://localhost:<remotePort>/*
jorvel dev --hmr-remotes
Starts a small reload server. When a remote recompiles, the CLI broadcasts a reload message.
Generated host templates include a demo that calls connectJorvelDevReload() (from @jorvel/runtime) when JORVEL_DEV_RELOAD_URL is present.
Routing in generated templates
Generated hosts include a small, framework-provided router (from @jorvel/runtime):
createRouter()to track the current URLresolveRoute()to pick which remote to mount based on the pathnamedispatchJorvelNavigate()to support cross-app navigation viawindow.dispatchEvent(new CustomEvent('jorvel:navigate', ...))
Status
Module Federation is wired through Rspack ModuleFederationPlugin using jorvel.federation.json, and the host demo loads remotes dynamically using @jorvel/runtime.
