Commit 5a5b052
Migrate from Babel to SWC transpiler with Shakapacker 9.0.0-beta.11
This PR migrates the JavaScript/TypeScript build pipeline from Babel to SWC
for significantly faster compilation times while maintaining full compatibility.
Key Changes:
- Upgrade Shakapacker from 9.0.0-beta.8 to 9.0.0-beta.11
- Switch javascript_transpiler from babel to swc in shakapacker.yml
- Add config/swc.config.js with ES2022 target and Stimulus-compatible settings
- Remove babel.config.js and most Babel build dependencies
- Retain minimal Babel packages (@babel/core, @babel/preset-react) for ESLint
- Configure ESLint to use @babel/preset-react for JSX parsing
- Update Jest to use @swc/jest for test transpilation
Technical Details:
- SWC configured with target: es2022 to preserve modern class features
- keepClassNames: true ensures Stimulus controller compatibility
- Module type set to es6 to preserve ES module semantics
- Babel retained only for linting, not for build/runtime transpilation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 577e4b5 commit 5a5b052
File tree
8 files changed
+224
-952
lines changed- config
8 files changed
+224
-952
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| 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 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 34 | | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
| |||
103 | 96 | | |
104 | 97 | | |
105 | 98 | | |
106 | | - | |
| 99 | + | |
| 100 | + | |
107 | 101 | | |
108 | 102 | | |
| 103 | + | |
109 | 104 | | |
| 105 | + | |
110 | 106 | | |
| 107 | + | |
111 | 108 | | |
112 | 109 | | |
113 | | - | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| |||
155 | 151 | | |
156 | 152 | | |
157 | 153 | | |
158 | | - | |
| 154 | + | |
159 | 155 | | |
160 | 156 | | |
161 | 157 | | |
| |||
0 commit comments