@umijs/server 4.0.60 → 4.0.62

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.
Files changed (2) hide show
  1. package/dist/server.js +1 -1
  2. package/package.json +2 -2
package/dist/server.js CHANGED
@@ -135,7 +135,7 @@ async function getMarkup(opts) {
135
135
  function createRequestHandler(opts) {
136
136
  return async (req, res, next) => {
137
137
  var _a;
138
- if (opts.historyType === "browser" && opts.base !== "/" && req.path === "/") {
138
+ if (opts.historyType === "browser" && opts.base !== "/" && req.path === "/" && process.env.DEV_SERVER_REDIRECT !== "none") {
139
139
  res.redirect(opts.base);
140
140
  } else if (((_a = req.headers.accept) == null ? void 0 : _a.includes("text/html")) || req.headers.accept === "*/*" || req.path === opts.base) {
141
141
  res.set("Content-Type", "text/html");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/server",
3
- "version": "4.0.60",
3
+ "version": "4.0.62",
4
4
  "description": "@umijs/server",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/server#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -19,7 +19,7 @@
19
19
  "react": "18.1.0",
20
20
  "react-dom": "18.1.0",
21
21
  "react-router-dom": "6.3.0",
22
- "@umijs/bundler-utils": "4.0.60"
22
+ "@umijs/bundler-utils": "4.0.62"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"