@netlify/plugin-nextjs 4.1.0 → 4.1.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.
package/lib/index.js CHANGED
@@ -43,9 +43,7 @@ const plugin = {
43
43
  await functions_1.generateFunctions(constants, appDir);
44
44
  await functions_1.generatePagesResolver({ target, constants });
45
45
  await files_1.movePublicFiles({ appDir, outdir, publish });
46
- if (process.env.EXPERIMENTAL_ODB_TTL) {
47
- await files_1.patchNextFiles(basePath);
48
- }
46
+ await files_1.patchNextFiles(basePath);
49
47
  if (process.env.EXPERIMENTAL_MOVE_STATIC_PAGES) {
50
48
  console.log("The flag 'EXPERIMENTAL_MOVE_STATIC_PAGES' is no longer required, as it is now the default. To disable this behavior, set the env var 'SERVE_STATIC_FILES_FROM_ORIGIN' to 'true'");
51
49
  }
@@ -12,17 +12,19 @@ const makeHandler = () =>
12
12
  // We return a function and then call `toString()` on it to serialise it as the launcher function
13
13
  // eslint-disable-next-line max-params
14
14
  (conf, app, pageRoot, staticManifest = [], mode = 'ssr') => {
15
+ var _a;
15
16
  // This is just so nft knows about the page entrypoints. It's not actually used
16
17
  try {
17
18
  // eslint-disable-next-line node/no-missing-require
18
19
  require.resolve('./pages.js');
19
20
  }
20
21
  catch { }
21
- // eslint-disable-next-line no-underscore-dangle
22
- process.env._BYPASS_SSG = 'true';
23
22
  const ONE_YEAR_IN_SECONDS = 31536000;
23
+ (_a = process.env).NODE_ENV || (_a.NODE_ENV = 'production');
24
24
  // We don't want to write ISR files to disk in the lambda environment
25
25
  conf.experimental.isrFlushToDisk = false;
26
+ // eslint-disable-next-line no-underscore-dangle
27
+ process.env._BYPASS_SSG = 'true';
26
28
  // Set during the request as it needs the host header. Hoisted so we can define the function once
27
29
  let base;
28
30
  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.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -74,8 +74,8 @@
74
74
  "@babel/core": "^7.15.8",
75
75
  "@babel/preset-env": "^7.15.8",
76
76
  "@babel/preset-typescript": "^7.16.0",
77
- "@netlify/build": "^25.0.1",
78
- "@netlify/eslint-config-node": "^4.0.1",
77
+ "@netlify/build": "^26.0.1",
78
+ "@netlify/eslint-config-node": "^4.0.2",
79
79
  "@testing-library/cypress": "^8.0.1",
80
80
  "@types/fs-extra": "^9.0.13",
81
81
  "@types/jest": "^27.0.2",