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
Copy file name to clipboardExpand all lines: packages/docs/src/repl/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This README gives a high-level overview of how the REPL is structured, what each
11
11
The REPL is a browser-first system composed of three main parts:
12
12
13
13
- Bundler subsystem (web-worker + helpers): transforms user code, resolves imports, bundles modules, and prepares runnable artifacts.
14
-
- Service worker: Intercepts requests to `/repl/[id]/*` and messages the bundler subsystem (via BroadcastChannel) to get responses. This allows the REPL to work without a server.
14
+
- Service worker: Intercepts requests to `/repl/` and messages the bundler subsystem (via BroadcastChannel) to get responses. This allows the REPL to work without a server.
15
15
- UI (React/Qwik components + Monaco): editor, panels, console, options and controls that let users edit code and view outputs.
16
16
17
17
The codebase keeps bundling and heavy work off the main thread by using a web worker script per Qwik version.
@@ -37,12 +37,12 @@ The codebase keeps bundling and heavy work off the main thread by using a web wo
37
37
1. The UI component (`ui/editor.tsx` + `ui/monaco.tsx`) presents a code editor and controls.
38
38
2. When code is executed, the bundler subsystem is invoked. The UI posts a message to the bundler worker.
39
39
3. The bundler worker (`bundler-worker.ts`) makes the client and SSR bundles, and executes `render()` from the `entry.ssr` to get the SSR result HTML.
40
-
4. The UI also shows an iframe, loading `/repl/[id]/`.
40
+
4. The UI also shows an iframe, loading `/repl/client/[id]/`.
41
41
5. The service worker intercepts all requests and uses messages to get the bundle + html files from the worker.
42
42
43
43
### Flow diagram
44
44
45
-
- The iframe requests `/repl/[id]/`
45
+
- The iframe requests `/repl/client/[id]/`
46
46
- The service worker intercepts and sends a message to the REPL instance
47
47
- The REPL instance messages the bundler to bundle the user code
48
48
- The bundler messages the REPL instance with the result
@@ -52,7 +52,7 @@ The codebase keeps bundling and heavy work off the main thread by using a web wo
0 commit comments