Commit cae7872
Post-SWC migration improvements (#678)
Key improvements after SWC migration:
1. **SWC Development Mode Configuration**
- Added `development: env.isDevelopment` to SWC React transform
- Matches Babel's behavior for better dev error messages
- Improves debugging experience in development
2. **Babel Dependency Cleanup**
- Removed unused `babel-loader` (replaced by swc-loader)
- Removed unused `babel-plugin-macros` (not used in codebase)
- Moved `@babel/preset-react` to devDependencies (only needed for Jest/ESLint)
- Updated babel.config.js with clear comments explaining Babel is only for Jest/ESLint
3. **Test Coverage for Stimulus Controllers**
- Added test to verify SWC config preserves class names (keepClassNames: true)
- Verified React 19 compatibility with automatic runtime
- Fixed Jest config paths (setupFiles and testRegex)
4. **Documentation & Configuration**
- Documented that production builds use SWC, tests use Babel
- Clarified which Babel packages must be kept and why
- Simplified babel.config.js (removed unused plugins for webpack)
**React 19 Compatibility**: Verified SWC 1.13.5 works correctly with React 19
using automatic runtime transform.
**Dependencies Status**: @swc/core@1.13.5 and swc-loader@0.2.6 are latest versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8b80714 commit cae7872
File tree
5 files changed
+148
-386
lines changed- client/app/controllers
- config
5 files changed
+148
-386
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | | - | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 19 | + | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
29 | | - | |
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
110 | 107 | | |
111 | 108 | | |
112 | 109 | | |
| 110 | + | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | | - | |
| 155 | + | |
158 | 156 | | |
159 | | - | |
| 157 | + | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
| |||
0 commit comments