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/plugin-rsc/AGENTS.md
+6-41Lines changed: 6 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,48 +7,13 @@ This document provides AI-agent-specific guidance for the React Server Component
7
7
8
8
## Quick Reference for AI Agents
9
9
10
-
### Key Plugin Concepts
11
-
12
-
The RSC plugin creates three environments (see [README.md Basic Concepts](README.md#basic-concepts) for diagrams):
13
-
14
-
-**rsc** - Server component rendering
15
-
-**ssr** - Server-side rendering
16
-
-**client** - Browser hydration
17
-
18
10
### Essential Commands
19
11
20
12
```bash
21
-
pnpm -C packages/plugin-rsc dev # Watch mode development
22
-
pnpm -C packages/plugin-rsc test-e2e # Run e2e tests
23
-
pnpm -C packages/plugin-rsc test-e2e basic # Test specific example
13
+
# inside packages/plugin-rsc directory
14
+
pnpm build # build package
15
+
pnpm tsc # typecheck
16
+
pnpm dev # Watch mode development
17
+
pnpm test-e2e # Run e2e tests
18
+
pnpm test-e2e basic # Test specific example
24
19
```
25
-
26
-
### AI-Specific Development Tips
27
-
28
-
#### Making RSC Changes
29
-
30
-
1.**Start with `examples/starter/`** - Best learning resource for understanding RSC flows
31
-
2.**Use `examples/basic/` for testing** - Comprehensive test suite with routing
32
-
3.**Test across all environments** - Verify rsc, ssr, and client functionality
33
-
4.**Check virtual modules** - Important for RSC manifest and reference handling
34
-
35
-
#### Testing Patterns
36
-
37
-
-**examples/basic** - Add test cases to `src/routes/`, update routing, add tests to `e2e/basic.test.ts`
38
-
-**setupInlineFixture** - For isolated edge cases (see `e2e/ssr-thenable.test.ts` pattern)
39
-
40
-
#### Important File Locations
41
-
42
-
-`src/plugin.ts` - Main plugin implementation
43
-
-`src/environment/` - Environment-specific logic
44
-
-`rsc/`, `ssr/`, `browser/` - Runtime APIs
45
-
-`examples/` - Test applications and learning resources
46
-
47
-
### Debugging RSC Issues
48
-
49
-
1. Use `examples/starter` for basic reproduction
50
-
2. Check environment builds in `.vite/` directory
51
-
3. Examine RSC streams and client/server manifests
52
-
4. Verify HMR behavior across environments
53
-
54
-
For detailed setup, testing procedures, and architectural deep-dives, refer to the comprehensive documentation in [README.md](README.md) and [CONTRIBUTING.md](CONTRIBUTING.md).
0 commit comments