@vercel/next 4.0.15 → 4.0.16

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/index.js +8 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10739,12 +10739,15 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
10739
10739
  throw new Error("Invariant: contentType can't be undefined");
10740
10740
  }
10741
10741
  htmlFsRef = new import_build_utils.FileBlob({ contentType, data: prerender });
10742
- } else if (appDir && !dataRoute && isAppPathRoute && !(isBlocking || isFallback)) {
10742
+ } else if (appDir && !dataRoute && !prefetchDataRoute && isAppPathRoute && !(isBlocking || isFallback)) {
10743
10743
  const contentType = initialHeaders?.["content-type"];
10744
- htmlFsRef = new import_build_utils.FileFsRef({
10745
- fsPath: import_path2.default.join(appDir, `${routeFileNoExt}.body`),
10746
- contentType: contentType || "text/html;charset=utf-8"
10747
- });
10744
+ const fsPath = import_path2.default.join(appDir, `${routeFileNoExt}.body`);
10745
+ if (import_fs_extra3.default.existsSync(fsPath)) {
10746
+ htmlFsRef = new import_build_utils.FileFsRef({
10747
+ fsPath,
10748
+ contentType: contentType || "text/html;charset=utf-8"
10749
+ });
10750
+ }
10748
10751
  } else {
10749
10752
  htmlFsRef = isBlocking || isNotFound && !static404Page ? (
10750
10753
  // Blocking pages do not have an HTML fallback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.0.15",
3
+ "version": "4.0.16",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -30,7 +30,7 @@
30
30
  "@types/semver": "6.0.0",
31
31
  "@types/text-table": "0.2.1",
32
32
  "@types/webpack-sources": "3.2.0",
33
- "@vercel/build-utils": "7.2.5",
33
+ "@vercel/build-utils": "7.4.1",
34
34
  "@vercel/routing-utils": "3.1.0",
35
35
  "async-sema": "3.0.1",
36
36
  "buffer-crc32": "0.2.13",