Skip to content

Commit 5aa80e9

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 <noreply@anthropic.com>
1 parent ffca3cb commit 5aa80e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/swc.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const { env } = require('shakapacker');
33
const customConfig = {
44
options: {
55
jsc: {
6+
keepClassNames: true,
67
transform: {
78
react: {
89
refresh: env.isDevelopment && env.runningWebpackDevServer,

0 commit comments

Comments
 (0)