File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
packages/react-router-serve Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @react-router/serve " : patch
3+ ---
4+
5+ disable compression for RSC responses for now
Original file line number Diff line number Diff line change @@ -105,23 +105,28 @@ async function run() {
105105
106106 let app = express ( ) ;
107107 app . disable ( "x-powered-by" ) ;
108- app . use ( compression ( ) ) ;
109108 app . use (
110109 path . posix . join ( build . publicPath , "assets" ) ,
110+ compression ( ) ,
111111 express . static ( path . join ( build . assetsBuildDirectory , "assets" ) , {
112112 immutable : true ,
113113 maxAge : "1y" ,
114114 } ) ,
115115 ) ;
116- app . use ( build . publicPath , express . static ( build . assetsBuildDirectory ) ) ;
117- app . use ( express . static ( "public" , { maxAge : "1h" } ) ) ;
116+ app . use (
117+ build . publicPath ,
118+ compression ( ) ,
119+ express . static ( build . assetsBuildDirectory ) ,
120+ ) ;
121+ app . use ( compression ( ) , express . static ( "public" , { maxAge : "1h" } ) ) ;
118122 app . use ( morgan ( "tiny" ) ) ;
119123
120124 if ( isRSCServerBuild ( build ) ) {
121125 app . all ( "*" , createRequestListener ( build . fetch ) ) ;
122126 } else {
123127 app . all (
124128 "*" ,
129+ compression ( ) ,
125130 createRequestHandler ( {
126131 build,
127132 mode : process . env . NODE_ENV ,
You can’t perform that action at this time.
0 commit comments