Commit 7e92502
Revert to standard methods and target ES2022 for Stimulus compatibility
The arrow function approach didn't work because class fields are transformed differently by SWC, preventing Stimulus from discovering controller methods.
Changes:
- Reverted arrow functions back to standard class methods
- Changed SWC target from es2015 to es2022 to minimize class transformations
- Added optimizer config to preserve class structure
- Kept keepClassNames: true and loose: false for spec-compliant transforms
ES2022 has native support for modern class features, so SWC should apply minimal transformations that preserve Stimulus's ability to discover and bind controller methods.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent dd01474 commit 7e92502
File tree
2 files changed
+14
-7
lines changed- client/app/controllers
- config
2 files changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | | - | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | | - | |
| 28 | + | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | | - | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
0 commit comments