@modern-js/plugin-ssg 2.4.0 → 2.4.1-beta.0
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
CHANGED
|
@@ -207,7 +207,7 @@ var src_default = function() {
|
|
|
207
207
|
},
|
|
208
208
|
afterBuild: function afterBuild() {
|
|
209
209
|
return _asyncToGenerator(function() {
|
|
210
|
-
var resolvedConfig, appContext, appDirectory, entrypoints, output, server, ssg, tmp,
|
|
210
|
+
var resolvedConfig, appContext, appDirectory, entrypoints, output, server, ssg, tmp, _ref, outputPath, ssgOptions, buildDir, routes, pageRoutes, apiRoutes, intermediateOptions, ssgRoutes, htmlAry;
|
|
211
211
|
return __generator(this, function(_state) {
|
|
212
212
|
switch(_state.label){
|
|
213
213
|
case 0:
|
|
@@ -215,7 +215,7 @@ var src_default = function() {
|
|
|
215
215
|
appContext = api.useAppContext();
|
|
216
216
|
appDirectory = appContext.appDirectory, entrypoints = appContext.entrypoints;
|
|
217
217
|
output = resolvedConfig.output, server = resolvedConfig.server;
|
|
218
|
-
ssg = output.ssg, tmp = output.distPath,
|
|
218
|
+
ssg = output.ssg, tmp = output.distPath, _ref = tmp === void 0 ? {} : tmp, outputPath = _ref.root;
|
|
219
219
|
ssgOptions = (Array.isArray(ssg) ? ssg.pop() : ssg) || true;
|
|
220
220
|
buildDir = path.join(appDirectory, outputPath);
|
|
221
221
|
routes = readJSONSpec(buildDir);
|
|
@@ -266,7 +266,7 @@ var src_default = function() {
|
|
|
266
266
|
headers: {}
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
var
|
|
269
|
+
var _entryOptions_preventDefault = entryOptions.preventDefault, preventDefault = _entryOptions_preventDefault === void 0 ? [] : _entryOptions_preventDefault, tmp = entryOptions.routes, userRoutes = tmp === void 0 ? [] : tmp, headers1 = entryOptions.headers;
|
|
270
270
|
if (userRoutes.length > 0) {
|
|
271
271
|
userRoutes.forEach(function(route) {
|
|
272
272
|
if (typeof route === "string") {
|
|
@@ -18,6 +18,7 @@ export declare const openRouteSSR: (routes: ModernRoute[], entries?: string[]) =
|
|
|
18
18
|
entryPath: string;
|
|
19
19
|
isSPA?: boolean | undefined;
|
|
20
20
|
isApi?: boolean | undefined;
|
|
21
|
+
worker?: string | undefined;
|
|
21
22
|
responseHeaders?: Record<string, unknown> | undefined;
|
|
22
23
|
}[];
|
|
23
24
|
export declare const flattenRoutes: (routes: AgreedRoute[]) => AgreedRoute[];
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.4.0",
|
|
14
|
+
"version": "2.4.1-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"node-mocks-http": "^1.10.1",
|
|
59
59
|
"normalize-path": "^3.0.0",
|
|
60
60
|
"portfinder": "^1.0.28",
|
|
61
|
-
"@modern-js/utils": "2.4.0"
|
|
61
|
+
"@modern-js/utils": "2.4.1-beta.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"react-router-dom": ">=5.1.2"
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"react": "^18",
|
|
76
76
|
"react-router-dom": "^6.6.0",
|
|
77
77
|
"typescript": "^4",
|
|
78
|
-
"@modern-js/app-tools": "
|
|
79
|
-
"@modern-js/prod-server": "2.4.0",
|
|
78
|
+
"@modern-js/app-tools": "3.0.0-beta.0",
|
|
79
|
+
"@modern-js/prod-server": "2.4.1-beta.0",
|
|
80
80
|
"@modern-js/types": "2.4.0",
|
|
81
81
|
"@scripts/build": "2.4.0",
|
|
82
82
|
"@scripts/jest-config": "2.4.0"
|