@modern-js/runtime 0.0.0-next-1104a9f18 → 0.0.0-next-c835d71
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.
- package/CHANGELOG.md +9 -6
- package/dist/cjs/ssr/cli/index.js +1 -2
- package/dist/esm/ssr/cli/index.js +2 -3
- package/dist/esm-node/ssr/cli/index.js +2 -3
- package/dist/types/document/Body.d.ts +1 -0
- package/dist/types/document/Head.d.ts +1 -0
- package/dist/types/document/Html.d.ts +1 -0
- package/dist/types/document/Links.d.ts +1 -0
- package/dist/types/document/Root.d.ts +1 -0
- package/dist/types/document/Script.d.ts +1 -0
- package/dist/types/document/Scripts.d.ts +1 -0
- package/dist/types/router/runtime/DefaultNotFound.d.ts +1 -0
- package/dist/types/router/runtime/DeferredDataScripts.d.ts +2 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# @modern-js/runtime
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-c835d71
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- c835d714bc: fix: nested routes in ssg
|
|
8
|
+
fix: 修复嵌套路由在 SSG 中的问题
|
|
9
|
+
- 9c9ebba6f2: fix: fix duplicate re-exports of reduck
|
|
8
10
|
fix: 修复从 reduck 重复导出的 API
|
|
9
|
-
- Updated dependencies [
|
|
10
|
-
|
|
11
|
-
- @modern-js/
|
|
12
|
-
- @modern-js/types@0.0.0-next-
|
|
11
|
+
- Updated dependencies [1104a9f18b]
|
|
12
|
+
- Updated dependencies [c835d714bc]
|
|
13
|
+
- @modern-js/utils@0.0.0-next-c835d71
|
|
14
|
+
- @modern-js/types@0.0.0-next-c835d71
|
|
15
|
+
- @modern-js/plugin@0.0.0-next-c835d71
|
|
13
16
|
|
|
14
17
|
## 2.7.0
|
|
15
18
|
|
|
@@ -138,8 +138,7 @@ var cli_default = () => ({
|
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
const useSSG = (0, import_utils.isSingleEntry)(entrypoints) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig == null ? void 0 : ssgConfig[0]) === "function" || Boolean(ssgConfig == null ? void 0 : ssgConfig[entryName]);
|
|
141
|
+
const useSSG = (0, import_utils.isSSGEntry)(userConfig, entryName, entrypoints);
|
|
143
142
|
ssrConfigMap.set(entryName, ssrConfig || useSSG);
|
|
144
143
|
if (ssrConfig || useSSG) {
|
|
145
144
|
imports.push({
|
|
@@ -61,7 +61,7 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
61
61
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
62
62
|
}
|
|
63
63
|
import path from "path";
|
|
64
|
-
import { getEntryOptions, SERVER_RENDER_FUNCTION_NAME, LOADABLE_STATS_FILE, isUseSSRBundle, createRuntimeExportsUtils,
|
|
64
|
+
import { getEntryOptions, SERVER_RENDER_FUNCTION_NAME, LOADABLE_STATS_FILE, isUseSSRBundle, createRuntimeExportsUtils, isSSGEntry } from "@modern-js/utils";
|
|
65
65
|
var PLUGIN_IDENTIFIER = "ssr";
|
|
66
66
|
var hasStringSSREntry = function(userConfig) {
|
|
67
67
|
var isStreaming = function(ssr) {
|
|
@@ -165,8 +165,7 @@ var cli_default = function() {
|
|
|
165
165
|
throw new Error("You should switch to file-system based router to support streaming SSR.");
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
var
|
|
169
|
-
var useSSG = isSingleEntry(entrypoints) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[0]) === "function" || Boolean(ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[entryName]);
|
|
168
|
+
var useSSG = isSSGEntry(userConfig, entryName, entrypoints);
|
|
170
169
|
ssrConfigMap.set(entryName, ssrConfig || useSSG);
|
|
171
170
|
if (ssrConfig || useSSG) {
|
|
172
171
|
imports.push({
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
LOADABLE_STATS_FILE,
|
|
6
6
|
isUseSSRBundle,
|
|
7
7
|
createRuntimeExportsUtils,
|
|
8
|
-
|
|
8
|
+
isSSGEntry
|
|
9
9
|
} from "@modern-js/utils";
|
|
10
10
|
const PLUGIN_IDENTIFIER = "ssr";
|
|
11
11
|
const hasStringSSREntry = (userConfig) => {
|
|
@@ -113,8 +113,7 @@ var cli_default = () => ({
|
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
const useSSG = isSingleEntry(entrypoints) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig == null ? void 0 : ssgConfig[0]) === "function" || Boolean(ssgConfig == null ? void 0 : ssgConfig[entryName]);
|
|
116
|
+
const useSSG = isSSGEntry(userConfig, entryName, entrypoints);
|
|
118
117
|
ssrConfigMap.set(entryName, ssrConfig || useSSG);
|
|
119
118
|
if (ssrConfig || useSSG) {
|
|
120
119
|
imports.push({
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-c835d71",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=14.17.6"
|
|
17
17
|
},
|
|
@@ -158,9 +158,9 @@
|
|
|
158
158
|
"react-side-effect": "^2.1.1",
|
|
159
159
|
"redux-logger": "^3.0.6",
|
|
160
160
|
"styled-components": "^5.3.1",
|
|
161
|
-
"@modern-js/plugin": "0.0.0-next-
|
|
162
|
-
"@modern-js/types": "0.0.0-next-
|
|
163
|
-
"@modern-js/utils": "0.0.0-next-
|
|
161
|
+
"@modern-js/plugin": "0.0.0-next-c835d71",
|
|
162
|
+
"@modern-js/types": "0.0.0-next-c835d71",
|
|
163
|
+
"@modern-js/utils": "0.0.0-next-c835d71"
|
|
164
164
|
},
|
|
165
165
|
"peerDependencies": {
|
|
166
166
|
"react": ">=17",
|
|
@@ -181,11 +181,11 @@
|
|
|
181
181
|
"react-dom": "^18",
|
|
182
182
|
"ts-jest": "^27.0.4",
|
|
183
183
|
"typescript": "^4",
|
|
184
|
-
"@modern-js/app-tools": "0.0.0-next-
|
|
185
|
-
"@modern-js/core": "0.0.0-next-
|
|
186
|
-
"@modern-js/server-core": "0.0.0-next-
|
|
187
|
-
"@scripts/
|
|
188
|
-
"@scripts/
|
|
184
|
+
"@modern-js/app-tools": "0.0.0-next-c835d71",
|
|
185
|
+
"@modern-js/core": "0.0.0-next-c835d71",
|
|
186
|
+
"@modern-js/server-core": "0.0.0-next-c835d71",
|
|
187
|
+
"@scripts/build": "0.0.0-next-c835d71",
|
|
188
|
+
"@scripts/jest-config": "0.0.0-next-c835d71"
|
|
189
189
|
},
|
|
190
190
|
"sideEffects": false,
|
|
191
191
|
"modernConfig": {},
|