@shuvi/platform-web 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -111,10 +111,7 @@ export const createApp = ({ routes, appData, appComponent }) => {
|
|
|
111
111
|
window.location.replace(location);
|
|
112
112
|
}
|
|
113
113
|
else {
|
|
114
|
-
next(
|
|
115
|
-
path: location,
|
|
116
|
-
replace: true
|
|
117
|
-
});
|
|
114
|
+
next(location);
|
|
118
115
|
}
|
|
119
116
|
runLoadersTrace.setAttribute(SHUVI_CLIENT_RUN_LOADERS.attrs.errorType.name, 'redirect');
|
|
120
117
|
runLoadersTrace.stop();
|
|
@@ -51,6 +51,8 @@ export const createApp = options => {
|
|
|
51
51
|
if (isRedirect(error)) {
|
|
52
52
|
const location = error.headers.get('Location');
|
|
53
53
|
const status = error.status;
|
|
54
|
+
// server side redirect is different from regular route redirect because it has the extra data - statusCode
|
|
55
|
+
// So it won't change route target, but just store the redirect location in state
|
|
54
56
|
next({
|
|
55
57
|
path: pathToString(to),
|
|
56
58
|
replace: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/platform-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@next/react-refresh-utils": "12.1.6",
|
|
75
|
-
"@shuvi/error-overlay": "1.0.
|
|
76
|
-
"@shuvi/hook": "1.0.
|
|
77
|
-
"@shuvi/platform-shared": "1.0.
|
|
78
|
-
"@shuvi/router": "1.0.
|
|
79
|
-
"@shuvi/router-react": "1.0.
|
|
80
|
-
"@shuvi/runtime": "1.0.
|
|
81
|
-
"@shuvi/shared": "1.0.
|
|
82
|
-
"@shuvi/toolpack": "1.0.
|
|
83
|
-
"@shuvi/utils": "1.0.
|
|
75
|
+
"@shuvi/error-overlay": "1.0.42",
|
|
76
|
+
"@shuvi/hook": "1.0.42",
|
|
77
|
+
"@shuvi/platform-shared": "1.0.42",
|
|
78
|
+
"@shuvi/router": "1.0.42",
|
|
79
|
+
"@shuvi/router-react": "1.0.42",
|
|
80
|
+
"@shuvi/runtime": "1.0.42",
|
|
81
|
+
"@shuvi/shared": "1.0.42",
|
|
82
|
+
"@shuvi/toolpack": "1.0.42",
|
|
83
|
+
"@shuvi/utils": "1.0.42",
|
|
84
84
|
"content-type": "1.0.4",
|
|
85
85
|
"core-js": "3.6.5",
|
|
86
86
|
"doura": "0.0.13",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"whatwg-fetch": "3.0.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@shuvi/service": "1.0.
|
|
101
|
+
"@shuvi/service": "1.0.42"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@shuvi/service": "workspace:*",
|