@modern-js/main-doc 0.0.0-next-1679423474813 → 0.0.0-next-1679490675897
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 +6 -4
- package/docs/en/apis/app/runtime/web-server/hook.mdx +1 -3
- package/docs/en/apis/app/runtime/web-server/middleware.mdx +1 -4
- package/docs/en/guides/advanced-features/compatibility.mdx +1 -0
- package/docs/en/guides/advanced-features/rspack-start.mdx +1 -1
- package/docs/en/guides/get-started/quick-start.mdx +2 -0
- package/docs/zh/apis/app/runtime/web-server/hook.mdx +1 -3
- package/docs/zh/apis/app/runtime/web-server/middleware.mdx +1 -4
- package/docs/zh/guides/advanced-features/compatibility.mdx +1 -0
- package/docs/zh/guides/advanced-features/rspack-start.mdx +1 -1
- package/docs/zh/guides/get-started/quick-start.mdx +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# @modern-js/main-doc
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1679490675897
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 92d247f1e3: fix: support tools.devServer.header include string[] type, remove get & delete & apply api in hook or middleware api
|
|
8
|
+
fix: 支持 tools.devServer.header 包含字符串数组类型,移除 Hook 和 Middleware 中对 响应 Cookie 的获取、删除操作
|
|
9
|
+
- 19e552a077: fix: main doc theme
|
|
8
10
|
|
|
9
11
|
fix: 首页深色模式问题
|
|
10
12
|
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- @modern-js/builder-doc@0.0.0-next-
|
|
13
|
+
- Updated dependencies [cfdbf80331]
|
|
14
|
+
- @modern-js/builder-doc@0.0.0-next-1679490675897
|
|
13
15
|
|
|
14
16
|
## 2.9.0
|
|
15
17
|
|
|
@@ -38,9 +38,7 @@ type HookContext = {
|
|
|
38
38
|
set: (key: string, value: string) => void;
|
|
39
39
|
status: (code: number) => void;
|
|
40
40
|
cookies: {
|
|
41
|
-
|
|
42
|
-
set: (key: string, value: string) => void;
|
|
43
|
-
delete: () => void;
|
|
41
|
+
set: (key: string, value: string, options?: any) => void;
|
|
44
42
|
clear: () => void;
|
|
45
43
|
};
|
|
46
44
|
raw: (
|
|
@@ -46,11 +46,8 @@ type MiddlewareContext = {
|
|
|
46
46
|
set: (key: string, value: string) => void;
|
|
47
47
|
status: (code: number) => void;
|
|
48
48
|
cookies: {
|
|
49
|
-
|
|
50
|
-
set: (key: string, value: string) => void;
|
|
51
|
-
delete: () => void;
|
|
49
|
+
set: (key: string, value: string, options?: any) => void;
|
|
52
50
|
clear: () => void;
|
|
53
|
-
apply: () => void;
|
|
54
51
|
};
|
|
55
52
|
raw: (
|
|
56
53
|
body: string,
|
|
@@ -75,4 +75,5 @@ Visit the page `http://localhost:8080/__polyfill__` on Chrome 51 to see:
|
|
|
75
75
|
:::caution
|
|
76
76
|
This feature only works when using Modern.js built-in Web Server.
|
|
77
77
|
|
|
78
|
+
If you need to customize the HTML template, please refer to [HTML Template](/guides/basic-features/html.html). Manually modifying the template through html.template / tools.html will cause this feature not work.
|
|
78
79
|
:::
|
|
@@ -139,6 +139,8 @@ The bundle is generated to `dist/` by default, and the directory structure is as
|
|
|
139
139
|
└── js
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
+
> If you want to customize the output directory, please refer to [Output Files](https://modernjs.dev/builder/en/guide/basic/output-files.html).
|
|
143
|
+
|
|
142
144
|
## Verify
|
|
143
145
|
|
|
144
146
|
Execute `pnpm run serve` in the project to verify locally that the bundle is running correctly:
|
|
@@ -36,9 +36,7 @@ type HookContext = {
|
|
|
36
36
|
set: (key: string, value: string) => void;
|
|
37
37
|
status: (code: number) => void;
|
|
38
38
|
cookies: {
|
|
39
|
-
|
|
40
|
-
set: (key: string, value: string) => void;
|
|
41
|
-
delete: () => void;
|
|
39
|
+
set: (key: string, value: string, options?: any) => void;
|
|
42
40
|
clear: () => void;
|
|
43
41
|
};
|
|
44
42
|
raw: (
|
|
@@ -45,11 +45,8 @@ type MiddlewareContext = {
|
|
|
45
45
|
set: (key: string, value: string) => void;
|
|
46
46
|
status: (code: number) => void;
|
|
47
47
|
cookies: {
|
|
48
|
-
|
|
49
|
-
set: (key: string, value: string) => void;
|
|
50
|
-
delete: () => void;
|
|
48
|
+
set: (key: string, value: string, options?: any) => void;
|
|
51
49
|
clear: () => void;
|
|
52
|
-
apply: () => void;
|
|
53
50
|
};
|
|
54
51
|
raw: (
|
|
55
52
|
body: string,
|
package/package.json
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-1679490675897",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"registry": "https://registry.npmjs.org/",
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
20
|
+
"@modern-js/builder-doc": "0.0.0-next-1679490675897"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"classnames": "^2",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"fs-extra": "^10",
|
|
30
30
|
"@types/node": "^16",
|
|
31
31
|
"@types/fs-extra": "^9",
|
|
32
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
33
|
-
"@modern-js/doc-tools": "0.0.0-next-
|
|
34
|
-
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-
|
|
32
|
+
"@modern-js/builder-doc": "0.0.0-next-1679490675897",
|
|
33
|
+
"@modern-js/doc-tools": "0.0.0-next-1679490675897",
|
|
34
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1679490675897"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "modern dev",
|