Commit 83faebc
Fix CSS Modules configuration for Shakapacker 9.x compatibility
Shakapacker 9 changed the CSS Modules default configuration from default
exports to named exports (namedExport: true). This breaks existing code
that uses `import styles from './style.module.css'` syntax.
This commit adds webpack configuration to override Shakapacker 9's CSS
Modules settings and restore backward compatibility with the v8 behavior.
Changes:
- Override namedExport: false to support default imports
- Set exportLocalsConvention: 'camelCase' to match existing usage
- Add configuration in Pro dummy commonWebpackConfig
- Matches the fix already applied to regular dummy in previous commits
This fixes CI test failures where React components weren't rendering
because CSS module imports were failing at runtime.
Related to Shakapacker upgrade from 8.0.0 to 9.1.0.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 42d8f98 commit 83faebc
File tree
1 file changed
+32
-1
lines changed- react_on_rails_pro/spec/dummy/config/webpack
1 file changed
+32
-1
lines changedLines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
52 | 83 | | |
53 | 84 | | |
0 commit comments