@react-router/serve 7.0.0-pre.0 → 7.0.0-pre.1

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,16 @@
1
1
  # `@remix-run/serve`
2
2
 
3
+ ## 7.0.0-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - - Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html ([#12071](https://github.com/remix-run/react-router/pull/12071))
8
+ - Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time
9
+ - Updated dependencies:
10
+ - `react-router@7.0.0-pre.1`
11
+ - `@react-router/node@7.0.0-pre.1`
12
+ - `@react-router/express@7.0.0-pre.1`
13
+
3
14
  ## 7.0.0-pre.0
4
15
 
5
16
  ### Major Changes
package/README.md CHANGED
@@ -1,13 +1,7 @@
1
- # Welcome to Remix!
1
+ # @react-router/serve
2
2
 
3
- [Remix](https://remix.run) is a web framework that helps you build better websites with React.
4
-
5
- To get started, open a new shell and run:
3
+ Production application server for [React Router.](https://github.com/remix-run/react-router)
6
4
 
7
5
  ```sh
8
- npx create-remix@latest
6
+ npm install @react-router/serve
9
7
  ```
10
-
11
- Then follow the prompts you see in your terminal.
12
-
13
- For more information about Remix, [visit remix.run](https://remix.run)!
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/serve v7.0.0-pre.0
2
+ * @react-router/serve v7.0.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -88,15 +88,7 @@ async function run() {
88
88
  immutable: true,
89
89
  maxAge: "1y"
90
90
  }));
91
- app.use(build.publicPath, express__default["default"].static(build.assetsBuildDirectory, {
92
- // Don't redirect directory index.html request to include a trailing slash
93
- redirect: false,
94
- setHeaders: function (res, path) {
95
- if (path.endsWith(".data")) {
96
- res.set("Content-Type", "text/x-turbo");
97
- }
98
- }
99
- }));
91
+ app.use(build.publicPath, express__default["default"].static(build.assetsBuildDirectory));
100
92
  app.use(express__default["default"].static("public", {
101
93
  maxAge: "1h"
102
94
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/serve",
3
- "version": "7.0.0-pre.0",
3
+ "version": "7.0.0-pre.1",
4
4
  "description": "Production application server for React Router",
5
5
  "bugs": {
6
6
  "url": "https://github.com/remix-run/react-router/issues"
@@ -23,11 +23,11 @@
23
23
  "get-port": "5.1.1",
24
24
  "morgan": "^1.10.0",
25
25
  "source-map-support": "^0.5.21",
26
- "@react-router/express": "7.0.0-pre.0",
27
- "@react-router/node": "7.0.0-pre.0"
26
+ "@react-router/express": "7.0.0-pre.1",
27
+ "@react-router/node": "7.0.0-pre.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "react-router": "7.0.0-pre.0"
30
+ "react-router": "7.0.0-pre.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/compression": "^1.7.0",