@vercel/next 20.0.0 → 20.0.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.
Files changed (2) hide show
  1. package/dist/index.js +12 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -14108,6 +14108,16 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
14108
14108
  }
14109
14109
  }
14110
14110
  };
14111
+ function validateStaticFiles(files, staticPrefix) {
14112
+ if (Object.keys(files).some(
14113
+ (file) => file.startsWith(`${staticPrefix}immutable/`)
14114
+ )) {
14115
+ throw new import_build_utils.NowBuildError({
14116
+ message: 'The Next.js build produced files in "_next/static/immutable" while the Next.js adapter was disabled. Use the Next.js Vercel Adapter instead of manually setting supportsImmutableAssets:true.',
14117
+ code: "NEXT_BUILDER_IMMUTABLE_STATIC_FILES"
14118
+ });
14119
+ }
14120
+ }
14111
14121
  async function getStaticFiles(entryPath, entryDirectory, outputDirectory) {
14112
14122
  const collectLabel = "Collected static files (public/, static/, .next/static)";
14113
14123
  console.time(collectLabel);
@@ -14115,6 +14125,7 @@ async function getStaticFiles(entryPath, entryDirectory, outputDirectory) {
14115
14125
  "**",
14116
14126
  import_path3.default.join(entryPath, outputDirectory, "static")
14117
14127
  );
14128
+ validateStaticFiles(nextStaticFiles, "");
14118
14129
  const staticFolderFiles = await (0, import_build_utils.glob)("**", import_path3.default.join(entryPath, "static"));
14119
14130
  let publicFolderFiles = {};
14120
14131
  let publicFolderPath;
@@ -14136,12 +14147,6 @@ async function getStaticFiles(entryPath, entryDirectory, outputDirectory) {
14136
14147
  const staticDirectoryFiles = {};
14137
14148
  const publicDirectoryFiles = {};
14138
14149
  for (const file of Object.keys(nextStaticFiles)) {
14139
- if (file.startsWith("immutable/")) {
14140
- throw new import_build_utils.NowBuildError({
14141
- message: 'The Next.js build produced files in "_next/static/immutable" while the Next.js adapter was disabled. Use the Next.js Vercel Adapter instead of manually setting supportsImmutableAssets=true.',
14142
- code: "NEXT_BUILDER_IMMUTABLE_STATIC_FILES"
14143
- });
14144
- }
14145
14150
  const outputPath = import_path3.default.posix.join(entryDirectory, `_next/static/${file}`);
14146
14151
  staticFiles[outputPath] = nextStaticFiles[file];
14147
14152
  }
@@ -18440,6 +18445,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18440
18445
  const outDirectory = resultingExport.outDirectory;
18441
18446
  (0, import_build_utils5.debug)(`next export should use trailing slash: ${trailingSlash2}`);
18442
18447
  const filesAfterBuild = await (0, import_build_utils5.glob)("**", outDirectory);
18448
+ validateStaticFiles(filesAfterBuild, "_next/static/");
18443
18449
  const output = {
18444
18450
  ...filesAfterBuild,
18445
18451
  ...privateOutputs.files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -59,8 +59,8 @@
59
59
  "vite": "6.4.3",
60
60
  "vitest": "4.1.10",
61
61
  "webpack-sources": "3.2.3",
62
- "@vercel/build-utils": "14.18.0",
63
- "@vercel/routing-utils": "6.6.0"
62
+ "@vercel/routing-utils": "6.6.0",
63
+ "@vercel/build-utils": "14.18.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "node build.mjs",