@netlify/plugin-nextjs 4.39.0 → 4.39.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.
@@ -54,10 +54,10 @@ const getNetlifyNextServer = (NextServer) => {
54
54
  netlifyPrebundleReact(path) {
55
55
  var _a, _b, _c;
56
56
  const routesManifest = (_a = this.getRoutesManifest) === null || _a === void 0 ? void 0 : _a.call(this);
57
- const appPathsManifest = (_b = this.getAppPathsManifest) === null || _b === void 0 ? void 0 : _b.call(this);
57
+ const appPathsRoutes = (_b = this.getAppPathRoutes) === null || _b === void 0 ? void 0 : _b.call(this);
58
58
  const routes = routesManifest && [...routesManifest.staticRoutes, ...routesManifest.dynamicRoutes];
59
- const matchedRoute = routes === null || routes === void 0 ? void 0 : routes.find((route) => new RegExp(route.regex).test(path.split('?')[0]));
60
- const isAppRoute = appPathsManifest && matchedRoute ? appPathsManifest[(0, handlerUtils_1.joinPaths)(matchedRoute.page, 'page')] : false;
59
+ const matchedRoute = routes === null || routes === void 0 ? void 0 : routes.find((route) => new RegExp(route.regex).test(new URL(path, 'http://n').pathname));
60
+ const isAppRoute = appPathsRoutes && matchedRoute ? appPathsRoutes[matchedRoute.page] : false;
61
61
  if (isAppRoute) {
62
62
  // app routes should use prebundled React
63
63
  // eslint-disable-next-line no-underscore-dangle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.39.0",
3
+ "version": "4.39.1",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@delucis/if-env": "^1.1.2",
40
- "@netlify/build": "^29.15.0",
40
+ "@netlify/build": "^29.15.6",
41
41
  "@types/fs-extra": "^9.0.13",
42
42
  "@types/jest": "^27.4.1",
43
43
  "@types/merge-stream": "^1.1.2",