Skip to content

Commit cf7fd99

Browse files
justin808claude
andcommitted
Add SWC configuration for React Fast Refresh
Enable React Fast Refresh in development mode with SWC, matching the functionality previously provided by Babel. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 62ee4f1 commit cf7fd99

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

config/swc.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { env } = require('shakapacker');
2+
3+
const customConfig = {
4+
options: {
5+
jsc: {
6+
transform: {
7+
react: {
8+
refresh: env.isDevelopment && env.runningWebpackDevServer,
9+
},
10+
},
11+
},
12+
},
13+
};
14+
15+
module.exports = customConfig;

0 commit comments

Comments
 (0)