Skip to content

Commit 07c13ea

Browse files
justin808claude
andcommitted
Add loose mode and env config to .swcrc for proper class transforms
The issue was that .swcrc was missing critical SWC configuration that Shakapacker's swc-loader normally provides (loose: true and env config). When .swcrc exists, it takes precedence over the loader config, so we need to include these settings explicitly. This fixes Stimulus controller static properties not being properly transpiled, which was causing the RSpec tests to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 51b30e0 commit 07c13ea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.swcrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@
99
"react": {
1010
"runtime": "automatic"
1111
}
12-
}
12+
},
13+
"loose": true
1314
},
1415
"module": {
1516
"type": "es6"
17+
},
18+
"env": {
19+
"coreJs": 3,
20+
"mode": "entry"
1621
}
1722
}

0 commit comments

Comments
 (0)