Skip to content

Commit 88f3651

Browse files
justin808claude
andcommitted
Fix SWC config to preserve class names for Stimulus compatibility
Add keepClassNames: true to SWC configuration to ensure Stimulus controllers work correctly. Without this setting, class names are mangled during transpilation, breaking Stimulus functionality. This fixes failing RSpec tests for Turbo/Stimulus form submission. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ffca3cb commit 88f3651

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/swc.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const { env } = require('shakapacker');
33
const customConfig = {
44
options: {
55
jsc: {
6+
keepClassNames: true,
7+
loose: false,
8+
externalHelpers: false,
69
transform: {
710
react: {
811
refresh: env.isDevelopment && env.runningWebpackDevServer,

0 commit comments

Comments
 (0)