@shuvi/platform-web 1.0.46 → 1.0.48

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.
@@ -36,6 +36,9 @@ exports.default = (0, service_1.createServerPlugin)({
36
36
  }),
37
37
  sendHtml: (originalSendHtml) => __awaiter(void 0, void 0, void 0, function* () {
38
38
  var _d, _e;
39
- return (((_e = (_d = resources_1.default.server.server) === null || _d === void 0 ? void 0 : _d.sendHtml) === null || _e === void 0 ? void 0 : _e.call(_d, originalSendHtml)) || originalSendHtml);
39
+ return (((_e = (_d = resources_1.default.server.server) === null || _d === void 0 ? void 0 : _d.sendHtml) === null || _e === void 0 ? void 0 : _e.call(_d, originalSendHtml)) ||
40
+ originalSendHtml);
40
41
  })
42
+ }, {
43
+ name: 'shuvi-user-server'
41
44
  });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpaRenderer = void 0;
4
+ const shuvi_singleton_runtimeConfig_1 = require("@shuvi/platform-shared/shared/shuvi-singleton-runtimeConfig");
4
5
  const base_1 = require("./base");
5
6
  class SpaRenderer extends base_1.BaseRenderer {
6
7
  renderDocument({ req, app }) {
@@ -9,7 +10,8 @@ class SpaRenderer extends base_1.BaseRenderer {
9
10
  const appData = {
10
11
  ssr: false,
11
12
  pageData: {},
12
- basename
13
+ basename,
14
+ runtimeConfig: (0, shuvi_singleton_runtimeConfig_1.getPublicRuntimeConfig)() || {}
13
15
  };
14
16
  const document = {
15
17
  htmlAttrs: {},
@@ -40,8 +40,7 @@ class SsrRenderer extends base_1.BaseRenderer {
40
40
  Object.assign(acc, data);
41
41
  return acc;
42
42
  }, {});
43
- const appData = Object.assign(Object.assign({}, result.appData), { ssr: true, appState: store.getState(), pageData, basename: router.basename });
44
- appData.runtimeConfig = (0, shuvi_singleton_runtimeConfig_1.getPublicRuntimeConfig)() || {};
43
+ const appData = Object.assign(Object.assign({}, result.appData), { ssr: true, appState: store.getState(), pageData, basename: router.basename, runtimeConfig: (0, shuvi_singleton_runtimeConfig_1.getPublicRuntimeConfig)() || {} });
45
44
  const document = {
46
45
  htmlAttrs: Object.assign({}, result.htmlAttrs),
47
46
  headTags: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/platform-web",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
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.46",
76
- "@shuvi/hook": "1.0.46",
77
- "@shuvi/platform-shared": "1.0.46",
78
- "@shuvi/router": "1.0.46",
79
- "@shuvi/router-react": "1.0.46",
80
- "@shuvi/runtime": "1.0.46",
81
- "@shuvi/shared": "1.0.46",
82
- "@shuvi/toolpack": "1.0.46",
83
- "@shuvi/utils": "1.0.46",
75
+ "@shuvi/error-overlay": "1.0.48",
76
+ "@shuvi/hook": "1.0.48",
77
+ "@shuvi/platform-shared": "1.0.48",
78
+ "@shuvi/router": "1.0.48",
79
+ "@shuvi/router-react": "1.0.48",
80
+ "@shuvi/runtime": "1.0.48",
81
+ "@shuvi/shared": "1.0.48",
82
+ "@shuvi/toolpack": "1.0.48",
83
+ "@shuvi/utils": "1.0.48",
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.46"
101
+ "@shuvi/service": "1.0.48"
102
102
  },
103
103
  "devDependencies": {
104
104
  "@shuvi/service": "workspace:*",