Skip to content

Commit 020dae9

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 020dae9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/swc.config.js

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

0 commit comments

Comments
 (0)