@netlify/plugin-nextjs 4.2.8 → 4.3.0

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.
@@ -54,6 +54,9 @@ const matchesRewrite = (file, rewrites) => {
54
54
  exports.matchesRewrite = matchesRewrite;
55
55
  const getMiddleware = async (publish) => {
56
56
  var _a;
57
+ if (process.env.NEXT_SKIP_MIDDLEWARE) {
58
+ return [];
59
+ }
57
60
  const manifestPath = (0, pathe_1.join)(publish, 'server', 'middleware-manifest.json');
58
61
  if ((0, fs_extra_1.existsSync)(manifestPath)) {
59
62
  const manifest = await (0, fs_extra_1.readJson)(manifestPath, { throws: false });
@@ -30,6 +30,9 @@ const makeHandler = (conf, app, pageRoot, staticManifest = [], mode = 'ssr') =>
30
30
  // This is our flag that we use when patching the source
31
31
  // eslint-disable-next-line no-underscore-dangle
32
32
  process.env._BYPASS_SSG = 'true';
33
+ for (const [key, value] of Object.entries(conf.env)) {
34
+ process.env[key] = String(value);
35
+ }
33
36
  // Set during the request as it needs the host header. Hoisted so we can define the function once
34
37
  let base;
35
38
  augmentFsModule({ promises, staticManifest, pageRoot, getBase: () => base });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.2.8",
3
+ "version": "4.3.0",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -76,7 +76,7 @@
76
76
  "@babel/preset-env": "^7.15.8",
77
77
  "@babel/preset-typescript": "^7.16.0",
78
78
  "@netlify/build": "^26.5.0",
79
- "@netlify/eslint-config-node": "^5.1.6",
79
+ "@netlify/eslint-config-node": "^5.1.7",
80
80
  "@reach/dialog": "^0.16.2",
81
81
  "@reach/visually-hidden": "^0.16.0",
82
82
  "@testing-library/cypress": "^8.0.1",