@netlify/plugin-nextjs 5.13.0 → 5.13.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.
@@ -100,7 +100,8 @@ var applyTemplateVariables = (template, variables) => {
100
100
  var getHandlerFile = async (ctx) => {
101
101
  const templatesDir = join(ctx.pluginDir, "dist/build/templates");
102
102
  const templateVariables = {
103
- "{{useRegionalBlobs}}": ctx.useRegionalBlobs.toString()
103
+ "{{useRegionalBlobs}}": ctx.useRegionalBlobs.toString(),
104
+ "{{excludeStaticPath}}": posixJoin(ctx.buildConfig.basePath || "", "/_next/static/*")
104
105
  };
105
106
  if (ctx.relativeAppDir.length !== 0) {
106
107
  const template = await readFile(join(templatesDir, "handler-monorepo.tmpl.js"), "utf-8");
@@ -49,4 +49,9 @@ export default async function (req, context) {
49
49
  export const config = {
50
50
  path: '/*',
51
51
  preferStatic: true,
52
+ excludedPath: [
53
+ // We use `preferStatic: true` so we already won't run this on *existing* static assets,
54
+ // but by excluding this entire path we also avoid invoking the function just to 404.
55
+ '{{excludeStaticPath}}',
56
+ ],
52
57
  }
@@ -43,4 +43,9 @@ export default async function handler(req, context) {
43
43
  export const config = {
44
44
  path: '/*',
45
45
  preferStatic: true,
46
+ excludedPath: [
47
+ // We use `preferStatic: true` so we already won't run this on *existing* static assets,
48
+ // but by excluding this entire path we also avoid invoking the function just to 404.
49
+ '{{excludeStaticPath}}',
50
+ ],
46
51
  }
@@ -86,7 +86,7 @@ var pipeline = (0, import_util.promisify)(import_stream.pipeline);
86
86
 
87
87
  // package.json
88
88
  var name = "@netlify/plugin-nextjs";
89
- var version = "5.13.0";
89
+ var version = "5.13.1";
90
90
 
91
91
  // src/run/handlers/tags-handler.cts
92
92
  var import_storage = require("../storage/storage.cjs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.13.0",
3
+ "version": "5.13.1",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",