@netlify/plugin-nextjs 4.29.4 → 4.29.5-appdir.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.
@@ -364,7 +364,7 @@ const unpatchNextFiles = async (root) => {
364
364
  }
365
365
  };
366
366
  exports.unpatchNextFiles = unpatchNextFiles;
367
- const movePublicFiles = async ({ appDir, outdir, publish, }) => {
367
+ const movePublicFiles = async ({ appDir, outdir, publish, basePath, }) => {
368
368
  // `outdir` is a config property added when using Next.js with Nx. It's typically
369
369
  // a relative path outside of the appDir, e.g. '../../dist/apps/<app-name>', and
370
370
  // the parent directory of the .next directory.
@@ -373,7 +373,7 @@ const movePublicFiles = async ({ appDir, outdir, publish, }) => {
373
373
  // directory from the original app directory.
374
374
  const publicDir = outdir ? (0, pathe_1.join)(appDir, outdir, 'public') : (0, pathe_1.join)(appDir, 'public');
375
375
  if ((0, fs_extra_1.existsSync)(publicDir)) {
376
- await (0, fs_extra_1.copy)(publicDir, `${publish}/`);
376
+ await (0, fs_extra_1.copy)(publicDir, `${publish}${basePath}/`);
377
377
  }
378
378
  };
379
379
  exports.movePublicFiles = movePublicFiles;
package/lib/index.js CHANGED
@@ -94,7 +94,7 @@ const plugin = {
94
94
  const apiRoutes = await (0, functions_1.getExtendedApiRouteConfigs)(publish, appDir);
95
95
  await (0, functions_1.generateFunctions)(constants, appDir, apiRoutes);
96
96
  await (0, functions_1.generatePagesResolver)(constants);
97
- await (0, files_1.movePublicFiles)({ appDir, outdir, publish });
97
+ await (0, files_1.movePublicFiles)({ appDir, outdir, publish, basePath });
98
98
  await (0, files_1.patchNextFiles)(appDir);
99
99
  if (!(0, destr_1.default)(process.env.SERVE_STATIC_FILES_FROM_ORIGIN)) {
100
100
  await (0, files_1.moveStaticPages)({ target, netlifyConfig, i18n, basePath });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.29.4",
3
+ "version": "4.29.5-appdir.0",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@delucis/if-env": "^1.1.2",
39
- "@netlify/build": "^29.1.3",
39
+ "@netlify/build": "^29.3.0",
40
40
  "@types/fs-extra": "^9.0.13",
41
41
  "@types/jest": "^27.4.1",
42
42
  "@types/merge-stream": "^1.1.2",
43
43
  "@types/node": "^17.0.25",
44
- "next": "^13.0.6",
44
+ "next": "^13.0.7",
45
45
  "npm-run-all": "^4.1.5",
46
46
  "typescript": "^4.6.3"
47
47
  },