@netlify/plugin-nextjs 4.32.0 → 4.32.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.32.0",
3
+ "version": "4.32.2",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@delucis/if-env": "^1.1.2",
39
- "@netlify/build": "^29.6.7",
39
+ "@netlify/build": "^29.6.9",
40
40
  "@types/fs-extra": "^9.0.13",
41
41
  "@types/jest": "^27.4.1",
42
42
  "@types/merge-stream": "^1.1.2",
@@ -35,11 +35,10 @@ const handler = async (req, context) => {
35
35
  try {
36
36
  // We need to cache-bust the import because otherwise it will claim it
37
37
  // doesn't exist if the user creates it after the server starts
38
- const nextMiddleware = await import(`../../middleware.js#${idx++}`)
38
+ const nextMiddleware = await import(`../../middleware.js#${++idx}`)
39
39
  middleware = nextMiddleware.middleware
40
40
  } catch (importError) {
41
- // Error message is `Module not found "file://<path>/middleware.js#123456".` in Deno
42
- if (importError.code === 'ERR_MODULE_NOT_FOUND' && importError.message.includes(`middleware.js#${idx}`)) {
41
+ if (importError.code === 'ERR_MODULE_NOT_FOUND' && importError.message.includes(`middleware.js`)) {
43
42
  // No middleware, so we silently return
44
43
  return
45
44
  }