@@ -7,7 +7,7 @@ import type { BuildContext } from '../types';
77import type { EndpointModule } from '../../runtime/src/library/types' ;
88import type { QwikViteDevResponse } from '../../../qwik/src/optimizer/src/plugins/vite' ;
99import { loadUserResponse } from '../../middleware/request-handler/user-response' ;
10- import { getQwikCityUserContext } from '../../middleware/request-handler/utils' ;
10+ import { getQwikCityEnvData } from '../../middleware/request-handler/utils' ;
1111import { buildFromUrlPathname } from '../build' ;
1212import { notFoundHandler } from '../../middleware/request-handler/fallback-handler' ;
1313import type { QwikCityRequestContext } from '../../middleware/request-handler/types' ;
@@ -77,17 +77,17 @@ export function configureDevServer(ctx: BuildContext, server: ViteDevServer) {
7777 if ( userResponse . type === 'page' ) {
7878 // qwik city vite plugin should handle dev ssr rendering
7979 // but add the qwik city user context to the response object
80- const userContext = getQwikCityUserContext ( userResponse ) ;
80+ const envData = getQwikCityEnvData ( userResponse ) ;
8181 if ( ctx . isDevServerClientOnly ) {
8282 // because we stringify this content for the client only
8383 // dev server, there's some potential stringify issues
8484 // client only dev server will re-fetch anyways, so reset
85- userContext . qwikcity . response . body = undefined ;
85+ envData . qwikcity . response . body = undefined ;
8686 }
8787
88- ( res as QwikViteDevResponse ) . _qwikUserCtx = {
89- ...( res as QwikViteDevResponse ) . _qwikUserCtx ,
90- ...userContext ,
88+ ( res as QwikViteDevResponse ) . _qwikEnvData = {
89+ ...( res as QwikViteDevResponse ) . _qwikEnvData ,
90+ ...envData ,
9191 } ;
9292
9393 // update node response with status and headers
0 commit comments