@modern-js/server-core 2.31.2 → 2.32.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 +21 -0
- package/LICENSE +1 -1
- package/dist/types/types/config/server.d.ts +21 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @modern-js/server-plugin
|
|
2
2
|
|
|
3
|
+
## 2.32.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2447d64: feat: support ssr resources preload
|
|
8
|
+
feat: 支持 ssr 资源预加载
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 6076166: fix: packaging errors found by publint
|
|
13
|
+
|
|
14
|
+
fix: 修复 publint 检测到的 packaging 问题
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [e5a3fb4]
|
|
17
|
+
- Updated dependencies [6076166]
|
|
18
|
+
- Updated dependencies [a030aff]
|
|
19
|
+
- Updated dependencies [3c91100]
|
|
20
|
+
- Updated dependencies [5255eba]
|
|
21
|
+
- @modern-js/utils@2.32.0
|
|
22
|
+
- @modern-js/plugin@2.32.0
|
|
23
|
+
|
|
3
24
|
## 2.31.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/LICENSE
CHANGED
|
@@ -6,9 +6,30 @@ type Route = string | string[] | {
|
|
|
6
6
|
resHeaders?: Record<string, unknown>;
|
|
7
7
|
};
|
|
8
8
|
export type Routes = Record<string, Route>;
|
|
9
|
+
type PreloadInclude = Array<string | {
|
|
10
|
+
url: string;
|
|
11
|
+
type: string;
|
|
12
|
+
}>;
|
|
13
|
+
interface PreloadAttributes {
|
|
14
|
+
script?: Record<string, boolean | string>;
|
|
15
|
+
style?: Record<string, boolean | string>;
|
|
16
|
+
image?: Record<string, boolean | string>;
|
|
17
|
+
font?: Record<string, boolean | string>;
|
|
18
|
+
}
|
|
19
|
+
export type SSRPreload = {
|
|
20
|
+
/** Include external preload links to enhance the page's performance by preloading additional resources. */
|
|
21
|
+
include?: PreloadInclude;
|
|
22
|
+
/** Utilize string matching to exclude specific preload links. */
|
|
23
|
+
exclude?: RegExp | string;
|
|
24
|
+
/** Disable preload when the User-Agent is matched. */
|
|
25
|
+
userAgentFilter?: RegExp | string;
|
|
26
|
+
/** Include additional attributes to the Header Link. */
|
|
27
|
+
attributes?: PreloadAttributes;
|
|
28
|
+
};
|
|
9
29
|
export type SSR = boolean | {
|
|
10
30
|
forceCSR?: boolean;
|
|
11
31
|
mode?: SSRMode;
|
|
32
|
+
preload?: boolean | SSRPreload;
|
|
12
33
|
inlineScript?: boolean;
|
|
13
34
|
};
|
|
14
35
|
export type SSRByEntries = Record<string, SSR>;
|
package/package.json
CHANGED
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.32.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
22
22
|
"module": "./dist/esm/index.js",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
25
26
|
"node": {
|
|
26
27
|
"jsnext:source": "./src/index.ts",
|
|
27
28
|
"import": "./dist/esm/index.js",
|
|
28
29
|
"require": "./dist/cjs/index.js"
|
|
29
30
|
},
|
|
30
|
-
"types": "./dist/types/index.d.ts",
|
|
31
31
|
"default": "./dist/cjs/index.js"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@swc/helpers": "0.5.1",
|
|
36
|
-
"@modern-js/plugin": "2.
|
|
37
|
-
"@modern-js/utils": "2.
|
|
36
|
+
"@modern-js/plugin": "2.32.0",
|
|
37
|
+
"@modern-js/utils": "2.32.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/jest": "^29",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"jest": "^29",
|
|
44
44
|
"ts-jest": "^29.1.0",
|
|
45
45
|
"typescript": "^5",
|
|
46
|
-
"@modern-js/babel-preset-app": "2.
|
|
47
|
-
"@modern-js/types": "2.
|
|
48
|
-
"@scripts/
|
|
49
|
-
"@scripts/
|
|
46
|
+
"@modern-js/babel-preset-app": "2.32.0",
|
|
47
|
+
"@modern-js/types": "2.32.0",
|
|
48
|
+
"@scripts/jest-config": "2.32.0",
|
|
49
|
+
"@scripts/build": "2.32.0"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
52
|
"publishConfig": {
|