File tree 4 files changed +27
-2
lines changed
packages/plugin-stream-error
4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 5
5
### Major Changes
6
6
7
7
- f2c7df96: feat: plugin deal with stream error
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Change
12
+
13
+ - feat: plugin export head stream error recover component
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @ice/plugin-stream-error" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"description" : " " ,
5
5
"license" : " MIT" ,
6
6
"type" : " module" ,
9
9
"types" : " ./esm/index.d.ts" ,
10
10
"import" : " ./esm/index.js" ,
11
11
"default" : " ./esm/index.js"
12
- }
12
+ },
13
+ "./head-stream-error" : " ./esm/components/headStreamErrorRecoverScript.js"
13
14
},
14
15
"main" : " ./esm/index.js" ,
15
16
"types" : " ./esm/index.d.ts" ,
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+
3
+ export default function HeadStreamErrorRecoverScript ( { downgradeCSRHostname } ) {
4
+ return (
5
+ < script
6
+ dangerouslySetInnerHTML = { {
7
+ __html : `
8
+ window.addEventListener('load', () => {
9
+ if (!window._$ServerTimePoints && !window.__ICE_APP_CONTEXT__) {
10
+ window.location.hostname = '${ downgradeCSRHostname } ';
11
+ }
12
+ })` ,
13
+ }
14
+ }
15
+ crossOrigin = "anonymous"
16
+ />
17
+ ) ;
18
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments