Skip to content

Commit 9422ab0

Browse files
disable compression for RSC responses for now (#14381)
* disable compression for RSC responses for now * Simplify approach to just on or off completely --------- Co-authored-by: Matt Brophy <[email protected]>
1 parent acd84e3 commit 9422ab0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/nice-apples-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-router/serve": patch
3+
---
4+
5+
disable compression for RSC responses for now

packages/react-router-serve/cli.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ async function run() {
105105

106106
let app = express();
107107
app.disable("x-powered-by");
108-
app.use(compression());
108+
109+
if (!isRSCServerBuild(build)) {
110+
app.use(compression());
111+
}
112+
109113
app.use(
110114
path.posix.join(build.publicPath, "assets"),
111115
express.static(path.join(build.assetsBuildDirectory, "assets"), {

0 commit comments

Comments
 (0)