@modern-js/app-tools 1.8.1 → 1.8.2
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
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @modern-js/app-tools
|
|
2
2
|
|
|
3
|
+
## 1.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 44e3bb1: feat: support response headers
|
|
8
|
+
feat: 支持设置响应头
|
|
9
|
+
- Updated dependencies [0e28456]
|
|
10
|
+
- Updated dependencies [bfc1264]
|
|
11
|
+
- Updated dependencies [9a173a7]
|
|
12
|
+
- Updated dependencies [44e3bb1]
|
|
13
|
+
- @modern-js/prod-server@1.2.2
|
|
14
|
+
- @modern-js/core@1.13.2
|
|
15
|
+
- @modern-js/webpack@1.12.3
|
|
16
|
+
- @modern-js/types@1.6.1
|
|
17
|
+
- @modern-js/plugin-jarvis@1.2.14
|
|
18
|
+
- @modern-js/server@1.6.0
|
|
19
|
+
- @modern-js/utils@1.8.0
|
|
20
|
+
|
|
3
21
|
## 1.8.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -124,13 +124,18 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
|
|
|
124
124
|
let htmlRoutes = entrypoints.reduce((previous, {
|
|
125
125
|
entryName
|
|
126
126
|
}) => {
|
|
127
|
-
const
|
|
127
|
+
const entryOptions = getEntryOptions(entryName, ssr, ssrByEntries, packageName);
|
|
128
|
+
const isSSR = Boolean(entryOptions);
|
|
129
|
+
const {
|
|
130
|
+
resHeaders
|
|
131
|
+
} = (routes === null || routes === void 0 ? void 0 : routes[entryName]) || {};
|
|
128
132
|
let route = {
|
|
129
133
|
urlPath: `/${entryName === MAIN_ENTRY_NAME ? '' : entryName}`,
|
|
130
134
|
entryName,
|
|
131
135
|
entryPath: removeLeadingSlash(path.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? '.html' : '/index.html'}`)),
|
|
132
136
|
isSPA: true,
|
|
133
137
|
isSSR,
|
|
138
|
+
responseHeaders: resHeaders,
|
|
134
139
|
enableModernMode: Boolean(enableModernMode),
|
|
135
140
|
bundle: isSSR ? `${SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : undefined
|
|
136
141
|
};
|
|
@@ -136,13 +136,18 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
|
|
|
136
136
|
let htmlRoutes = entrypoints.reduce((previous, {
|
|
137
137
|
entryName
|
|
138
138
|
}) => {
|
|
139
|
-
const
|
|
139
|
+
const entryOptions = (0, _utils.getEntryOptions)(entryName, ssr, ssrByEntries, packageName);
|
|
140
|
+
const isSSR = Boolean(entryOptions);
|
|
141
|
+
const {
|
|
142
|
+
resHeaders
|
|
143
|
+
} = (routes === null || routes === void 0 ? void 0 : routes[entryName]) || {};
|
|
140
144
|
let route = {
|
|
141
145
|
urlPath: `/${entryName === _utils.MAIN_ENTRY_NAME ? '' : entryName}`,
|
|
142
146
|
entryName,
|
|
143
147
|
entryPath: (0, _utils.removeLeadingSlash)(_path.default.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? '.html' : '/index.html'}`)),
|
|
144
148
|
isSPA: true,
|
|
145
149
|
isSSR,
|
|
150
|
+
responseHeaders: resHeaders,
|
|
146
151
|
enableModernMode: Boolean(enableModernMode),
|
|
147
152
|
bundle: isSSR ? `${_utils.SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : undefined
|
|
148
153
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.8.
|
|
14
|
+
"version": "1.8.2",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.18.0",
|
|
60
|
-
"@modern-js/core": "^1.13.
|
|
60
|
+
"@modern-js/core": "^1.13.2",
|
|
61
61
|
"@modern-js/new-action": "^1.4.0",
|
|
62
62
|
"@modern-js/node-bundle-require": "^1.3.7",
|
|
63
63
|
"@modern-js/plugin": "^1.4.1",
|
|
64
64
|
"@modern-js/plugin-i18n": "^1.3.0",
|
|
65
65
|
"@modern-js/plugin-jarvis": "^1.2.14",
|
|
66
|
-
"@modern-js/prod-server": "^1.2.
|
|
66
|
+
"@modern-js/prod-server": "^1.2.2",
|
|
67
67
|
"@modern-js/server": "^1.6.0",
|
|
68
|
-
"@modern-js/types": "^1.6.
|
|
68
|
+
"@modern-js/types": "^1.6.1",
|
|
69
69
|
"@modern-js/utils": "^1.8.0",
|
|
70
|
-
"@modern-js/webpack": "^1.12.
|
|
70
|
+
"@modern-js/webpack": "^1.12.3",
|
|
71
71
|
"@babel/parser": "^7.18.0",
|
|
72
72
|
"@babel/traverse": "^7.18.0",
|
|
73
73
|
"@babel/types": "^7.18.0"
|