@netlify/plugin-nextjs
Advanced tools
Comparing version 5.5.0 to 5.5.1
@@ -504,4 +504,6 @@ | ||
}; | ||
var clearStaleEdgeHandlers = async (ctx) => { | ||
await rm(ctx.edgeFunctionsDir, { recursive: true, force: true }); | ||
}; | ||
var createEdgeHandlers = async (ctx) => { | ||
await rm(ctx.edgeFunctionsDir, { recursive: true, force: true }); | ||
const nextManifest = await ctx.getMiddlewareManifest(); | ||
@@ -521,3 +523,4 @@ const nextDefinitions = [ | ||
export { | ||
clearStaleEdgeHandlers, | ||
createEdgeHandlers | ||
}; |
@@ -124,5 +124,7 @@ | ||
}; | ||
var clearStaleServerHandlers = async (ctx) => { | ||
await rm(ctx.serverFunctionsDir, { recursive: true, force: true }); | ||
}; | ||
var createServerHandler = async (ctx) => { | ||
await tracer.withActiveSpan("createServerHandler", async () => { | ||
await rm(ctx.serverFunctionsDir, { recursive: true, force: true }); | ||
await mkdir(join(ctx.serverHandlerDir, ".netlify"), { recursive: true }); | ||
@@ -139,3 +141,4 @@ await copyNextServerCode(ctx); | ||
export { | ||
clearStaleServerHandlers, | ||
createServerHandler | ||
}; |
@@ -28,4 +28,4 @@ | ||
} from "./build/content/static.js"; | ||
import { createEdgeHandlers } from "./build/functions/edge.js"; | ||
import { createServerHandler } from "./build/functions/server.js"; | ||
import { clearStaleEdgeHandlers, createEdgeHandlers } from "./build/functions/edge.js"; | ||
import { clearStaleServerHandlers, createServerHandler } from "./build/functions/server.js"; | ||
import { setImageConfig } from "./build/image-cdn.js"; | ||
@@ -48,4 +48,8 @@ import { PluginContext } from "./build/plugin-context.js"; | ||
process.env.NEXT_PRIVATE_STANDALONE = "true"; | ||
if (!options.constants.IS_LOCAL) { | ||
await restoreBuildCache(new PluginContext(options)); | ||
const ctx = new PluginContext(options); | ||
if (options.constants.IS_LOCAL) { | ||
await clearStaleServerHandlers(ctx); | ||
await clearStaleEdgeHandlers(ctx); | ||
} else { | ||
await restoreBuildCache(ctx); | ||
} | ||
@@ -52,0 +56,0 @@ }); |
{ | ||
"name": "@netlify/plugin-nextjs", | ||
"version": "5.5.0", | ||
"version": "5.5.1", | ||
"description": "Run Next.js seamlessly on Netlify", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5246185
137136