Skip to content

Commit 1c4bef2

Browse files
ihabadhamclaude
andcommitted
Wire RSC bundle into webpackConfig.js
Add RSC_BUNDLE_ONLY env gate alongside the existing SERVER_BUNDLE_ONLY and CLIENT_BUNDLE_ONLY gates. Procfile.dev will use RSC_BUNDLE_ONLY=yes bin/shakapacker --watch to build the RSC bundle separately during development. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2f11ffe commit 1c4bef2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

config/webpack/webpackConfig.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
const clientWebpackConfig = require('./clientWebpackConfig');
55
const { default: serverWebpackConfig } = require('./serverWebpackConfig');
6+
const rscWebpackConfig = require('./rscWebpackConfig');
67

78
const webpackConfig = (envSpecific) => {
89
const clientConfig = clientWebpackConfig();
@@ -22,6 +23,10 @@ const webpackConfig = (envSpecific) => {
2223
// eslint-disable-next-line no-console
2324
console.log('[React on Rails] Creating only the server bundle.');
2425
result = serverConfig;
26+
} else if (process.env.RSC_BUNDLE_ONLY) {
27+
// eslint-disable-next-line no-console
28+
console.log('[React on Rails] Creating only the RSC bundle.');
29+
result = rscWebpackConfig();
2530
} else {
2631
// default is the standard client and server build
2732
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)