@runtimescope/remix
v0.10.7
Published
RuntimeScope for Remix — one install, works in entry.client.tsx and entry.server.tsx
Maintainers
Readme
@runtimescope/remix
One install for full-stack Remix apps — browser + server in a single package.
npm install @runtimescope/remixSetup
1. Environment
# .env
RUNTIMESCOPE_DSN=runtimescope://proj_xxx@localhost:6768/my-app2. Client entry
// app/entry.client.tsx
import { initClient } from '@runtimescope/remix/client';
initClient();
// ...existing RemixBrowser hydrateRoot callExpose the DSN to the browser via root.tsx loader (standard Remix pattern — see the Remix docs on "Exposing Environment Variables" for the full setup).
3. Server entry
// app/entry.server.tsx
import { initServer } from '@runtimescope/remix/server';
initServer();
// ...existing handleRequest export4. (Optional) Wrap loaders/actions
import { withRuntimeScope } from '@runtimescope/remix/server';
export const loader = withRuntimeScope(async ({ request }) => {
return json(await fetchData());
});Subpath Exports
| Import | Use in |
|--------|--------|
| @runtimescope/remix | Shared utilities, types |
| @runtimescope/remix/client | entry.client.tsx |
| @runtimescope/remix/server | entry.server.tsx, loaders, actions |
Never import /server from a component file — Remix bundles the server code into the browser and it'll break.
Production Safety
If RUNTIMESCOPE_DSN is unset, the SDK is completely inert — no connection attempts, no errors, zero overhead.
License
MIT
