@modern-js/plugin-ssg 2.3.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 +15 -0
- package/README.md +14 -18
- package/dist/js/treeshaking/index.js +3 -3
- package/dist/types/libs/util.d.ts +1 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @modern-js/plugin-ssg
|
|
2
2
|
|
|
3
|
+
## 2.4.1-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [11c053b]
|
|
8
|
+
- @modern-js/utils@2.4.1-beta.0
|
|
9
|
+
|
|
10
|
+
## 2.4.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [98a2733]
|
|
15
|
+
- Updated dependencies [8c2db5f]
|
|
16
|
+
- @modern-js/utils@2.4.0
|
|
17
|
+
|
|
3
18
|
## 2.3.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
|
4
3
|
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Modern.js</h1>
|
|
6
|
+
|
|
5
7
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<br/>
|
|
8
|
-
<a href="https://modernjs.dev" target="blank">
|
|
9
|
-
modernjs.dev
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
<p align="center">
|
|
13
|
-
The meta-framework suite designed from scratch for frontend-focused modern web development
|
|
8
|
+
A Progressive React Framework for modern web development.
|
|
14
9
|
</p>
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
11
|
+
## Getting Started
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## Documentation
|
|
23
16
|
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [API References](https://modernjs.dev/docs/apis)
|
|
17
|
+
- [English Documentation](https://modernjs.dev/en/)
|
|
18
|
+
- [中文文档](https://modernjs.dev)
|
|
27
19
|
|
|
28
20
|
## Contributing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-ssg",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
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.
|
|
61
|
+
"@modern-js/utils": "2.4.1-beta.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"react-router-dom": ">=5.1.2"
|
|
@@ -75,11 +75,11 @@
|
|
|
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.
|
|
80
|
-
"@modern-js/types": "2.
|
|
81
|
-
"@scripts/build": "2.
|
|
82
|
-
"@scripts/jest-config": "2.
|
|
78
|
+
"@modern-js/app-tools": "3.0.0-beta.0",
|
|
79
|
+
"@modern-js/prod-server": "2.4.1-beta.0",
|
|
80
|
+
"@modern-js/types": "2.4.0",
|
|
81
|
+
"@scripts/build": "2.4.0",
|
|
82
|
+
"@scripts/jest-config": "2.4.0"
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
85
|
"publishConfig": {
|