@modern-js/prod-server 1.18.1 → 1.19.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 +11 -0
- package/dist/js/modern/utils.js +2 -2
- package/dist/js/node/utils.js +2 -2
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @modern-js/prod-server
|
|
2
2
|
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1903f68: fix(server): failed to access static files when output.assetPrefix ends with /
|
|
8
|
+
|
|
9
|
+
fix(server): 修复 output.assetPrefix 以 / 结尾时无法正确访问的问题
|
|
10
|
+
|
|
11
|
+
- @modern-js/server-core@1.19.0
|
|
12
|
+
- @modern-js/utils@1.19.0
|
|
13
|
+
|
|
3
14
|
## 1.18.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/js/modern/utils.js
CHANGED
|
@@ -94,8 +94,8 @@ export const getStaticReg = (output = {}) => {
|
|
|
94
94
|
const staticFiles = [cssPath, jsPath, mediaPath].filter(v => Boolean(v));
|
|
95
95
|
const staticReg = ['static/', 'upload/', ...staticFiles];
|
|
96
96
|
const iconReg = ['favicon.ico', 'icon.png', ...favicons];
|
|
97
|
-
const regPrefix = prefix
|
|
98
|
-
const staticPathRegExp = new RegExp(`^${regPrefix}
|
|
97
|
+
const regPrefix = prefix.endsWith('/') ? prefix : `${prefix}/`;
|
|
98
|
+
const staticPathRegExp = new RegExp(`^${regPrefix}(${[...staticReg, ...iconReg].join('|')})`);
|
|
99
99
|
return staticPathRegExp;
|
|
100
100
|
};
|
|
101
101
|
export const prepareFavicons = (favicon, faviconByEntries) => {
|
package/dist/js/node/utils.js
CHANGED
|
@@ -123,8 +123,8 @@ const getStaticReg = (output = {}) => {
|
|
|
123
123
|
const staticFiles = [cssPath, jsPath, mediaPath].filter(v => Boolean(v));
|
|
124
124
|
const staticReg = ['static/', 'upload/', ...staticFiles];
|
|
125
125
|
const iconReg = ['favicon.ico', 'icon.png', ...favicons];
|
|
126
|
-
const regPrefix = prefix
|
|
127
|
-
const staticPathRegExp = new RegExp(`^${regPrefix}
|
|
126
|
+
const regPrefix = prefix.endsWith('/') ? prefix : `${prefix}/`;
|
|
127
|
+
const staticPathRegExp = new RegExp(`^${regPrefix}(${[...staticReg, ...iconReg].join('|')})`);
|
|
128
128
|
return staticPathRegExp;
|
|
129
129
|
};
|
|
130
130
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.19.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@modern-js/utils": "1.
|
|
31
|
+
"@modern-js/utils": "1.19.0",
|
|
32
32
|
"@babel/compat-data": "^7.17.10",
|
|
33
|
-
"@modern-js/server-core": "1.
|
|
33
|
+
"@modern-js/server-core": "1.19.0",
|
|
34
34
|
"axios": "^0.24.0",
|
|
35
35
|
"etag": "^1.8.1",
|
|
36
36
|
"fresh": "^0.5.2",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"ua-parser-js": "^0.7.28"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@modern-js/types": "1.
|
|
49
|
-
"@modern-js/core": "1.
|
|
50
|
-
"@scripts/jest-config": "1.
|
|
51
|
-
"@scripts/build": "1.
|
|
48
|
+
"@modern-js/types": "1.19.0",
|
|
49
|
+
"@modern-js/core": "1.19.0",
|
|
50
|
+
"@scripts/jest-config": "1.19.0",
|
|
51
|
+
"@scripts/build": "1.19.0",
|
|
52
52
|
"@types/cookie": "^0.4.1",
|
|
53
53
|
"@types/jest": "^27",
|
|
54
54
|
"@types/lru-cache": "^5.1.1",
|
|
@@ -101,6 +101,5 @@
|
|
|
101
101
|
"build": "wireit",
|
|
102
102
|
"dev": "modern build --watch",
|
|
103
103
|
"test": "wireit"
|
|
104
|
-
}
|
|
105
|
-
"readme": "\n<p align=\"center\">\n <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>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> 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.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
104
|
+
}
|
|
106
105
|
}
|