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/app/README.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,25 @@ This is the front-end for the Cypress App.
4
4
5
5
## Development
6
6
7
-
1. Use existing project to get a server (for example `cd packages/runner-ct && yarn cypress:open`)
8
-
2. It will open in a new browser on port 8080
9
-
3. Do `yarn start`. It will start the front-end for the new Cypress app
10
-
4. To back to the browser opened in step 2
11
-
5. Visit http://localhost:8080/__vite__/ for the new front-end powered by Vite (currently running the RunnerCt)
7
+
1.`yarn dev` (inside of `packages/app`)
8
+
2. It will open launchpad
9
+
3. Select Component Testing (current E2E is not fully working)
10
+
3. Open chrome (or another browser)
11
+
4. This launches the existing CT Runner. Change the URL to http://localhost:3000/__vite__/ (note the trailing `/`)
12
+
5. It should show the new Vite powered app
13
+
14
+
## Using existing, Vite-incompatible modules
15
+
16
+
Some of our modules, like `@packages/reporter`, `@packages/driver` and `@packages/runner-shared` cannot be easily
17
+
used with Vite due to circular dependencies and modules that do not have compatible ESM builds.
18
+
19
+
To work around this, when consuming existing code, it is bundled with webpack and made available under the
20
+
`window.UnifiedRunner` namespace. It is injected via [`injectBundle`](./src/runner/injectBundle.ts).
21
+
22
+
To add more code to the bundle, add it in the bundle root, `@packages/runner-ct/src/main.tsx` and attach it to
23
+
`window.UnifiedRunner`.
24
+
25
+
As a rule of thumb, avoid importing from the older, webpack based modules into this package. Instead, if you want to consume code from those older, webpack bundled modules, you should add them to the webpack root and consume them via `window.UnifiedRunner`. Ideally, update [`index.d.ts`](./index.d.ts) to add the types, as well.
12
26
13
27
### Icons
14
28
@@ -63,3 +77,4 @@ You can see this in the video with the Settings cog. It uses and `evenodd` fill
0 commit comments