Commit 0bd1017
Fix CSS modules fallback with identity proxy loader
The previous fallback wasn't providing the named exports that CSS modules
require. This fix uses an inline data URI loader to provide a Proxy object
that returns any property name as a string, allowing CSS module imports
like `import * as styles from './file.module.css'` to work in test
environments where CSS loaders aren't available.
The proxy returns the property name as-is for named imports (e.g.,
`styles.bright` returns "bright") and returns itself for default imports,
making it work with both import patterns.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 5055671 commit 0bd1017
File tree
1 file changed
+3
-5
lines changed- lib/generators/react_on_rails/templates/base/base/config/webpack
1 file changed
+3
-5
lines changedLines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 52 | + | |
| 53 | + | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
| |||
0 commit comments