@netlify/plugin-nextjs 4.3.0 → 4.3.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.
@@ -14,9 +14,12 @@ const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = requ
14
14
  // eslint-disable-next-line max-params
15
15
  const makeHandler = (conf, app, pageRoot, staticManifest = [], mode = 'ssr') => {
16
16
  var _a;
17
- // Change working directory into the site root
17
+ // Change working directory into the site root, unless using Nx, which moves the
18
+ // dist directory and handles this itself
18
19
  const dir = path.resolve(__dirname, app);
19
- process.chdir(dir);
20
+ if (pageRoot.startsWith(dir)) {
21
+ process.chdir(dir);
22
+ }
20
23
  // This is just so nft knows about the page entrypoints. It's not actually used
21
24
  try {
22
25
  // eslint-disable-next-line node/no-missing-require
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -75,8 +75,8 @@
75
75
  "@babel/core": "^7.15.8",
76
76
  "@babel/preset-env": "^7.15.8",
77
77
  "@babel/preset-typescript": "^7.16.0",
78
- "@netlify/build": "^26.5.0",
79
- "@netlify/eslint-config-node": "^5.1.7",
78
+ "@netlify/build": "^26.5.1",
79
+ "@netlify/eslint-config-node": "^5.1.8",
80
80
  "@reach/dialog": "^0.16.2",
81
81
  "@reach/visually-hidden": "^0.16.0",
82
82
  "@testing-library/cypress": "^8.0.1",