File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
solutions/app-tools/src/analyze Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @modern-js/app-tools ' : minor
3
+ ' @modern-js/types ' : minor
4
+ ---
5
+
6
+ feat(app-tools): route.json add ` isStream ` field.
7
+ feat(app-tools): route.json 添加 ` isStream ` 字段.
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ const collectHtmlRoutes = (
139
139
) ;
140
140
const isSSR = Boolean ( entryOptions ) ;
141
141
const isWorker = Boolean ( workerSSR ) ;
142
+ const isStream =
143
+ typeof entryOptions === 'object' && entryOptions . mode === 'stream' ;
142
144
const { resHeaders } = routes ?. [ entryName ] || ( { } as any ) ;
143
145
144
146
let route : ServerRoute | ServerRoute [ ] = {
@@ -152,6 +154,7 @@ const collectHtmlRoutes = (
152
154
) ,
153
155
) ,
154
156
isSPA : true ,
157
+ isStream,
155
158
isSSR,
156
159
responseHeaders : resHeaders ,
157
160
worker : isWorker
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export interface ServerRoute {
9
9
isSPA ?: boolean ;
10
10
// if route is ssr page
11
11
isSSR ?: boolean ;
12
+ // if route is stream response
13
+ isStream ?: boolean ;
12
14
// if route is api service
13
15
isApi ?: boolean ;
14
16
// worker js bundle for ssr page
You can’t perform that action at this time.
0 commit comments