@netlify/plugin-nextjs 4.38.0 → 4.38.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/templates/server.js +6 -6
- package/package.json +2 -2
package/lib/templates/server.js
CHANGED
|
@@ -47,16 +47,16 @@ const getNetlifyNextServer = (NextServer) => {
|
|
|
47
47
|
}
|
|
48
48
|
// doing what they do in https://github.com/vercel/vercel/blob/1663db7ca34d3dd99b57994f801fb30b72fbd2f3/packages/next/src/server-build.ts#L576-L580
|
|
49
49
|
netlifyPrebundleReact(path) {
|
|
50
|
-
var _a;
|
|
51
|
-
const routesManifest = this.getRoutesManifest();
|
|
52
|
-
const appPathsManifest = this.getAppPathsManifest();
|
|
53
|
-
const routes = [...routesManifest.staticRoutes, ...routesManifest.dynamicRoutes];
|
|
54
|
-
const matchedRoute = routes.find((route) => new RegExp(route.regex).test(path));
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
const routesManifest = (_a = this.getRoutesManifest) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
52
|
+
const appPathsManifest = (_b = this.getAppPathsManifest) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
53
|
+
const routes = routesManifest && [...routesManifest.staticRoutes, ...routesManifest.dynamicRoutes];
|
|
54
|
+
const matchedRoute = routes === null || routes === void 0 ? void 0 : routes.find((route) => new RegExp(route.regex).test(path));
|
|
55
55
|
const isAppRoute = appPathsManifest && matchedRoute ? appPathsManifest[(0, handlerUtils_1.joinPaths)(matchedRoute.page, 'page')] : false;
|
|
56
56
|
if (isAppRoute) {
|
|
57
57
|
// app routes should use prebundled React
|
|
58
58
|
// eslint-disable-next-line no-underscore-dangle
|
|
59
|
-
process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = ((
|
|
59
|
+
process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = ((_c = this.nextConfig.experimental) === null || _c === void 0 ? void 0 : _c.serverActions)
|
|
60
60
|
? 'experimental'
|
|
61
61
|
: 'next';
|
|
62
62
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.38.
|
|
3
|
+
"version": "4.38.1",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@netlify/esbuild": "0.14.39",
|
|
15
15
|
"@netlify/functions": "^1.6.0",
|
|
16
|
-
"@netlify/ipx": "^1.4.
|
|
16
|
+
"@netlify/ipx": "^1.4.1",
|
|
17
17
|
"@vercel/node-bridge": "^2.1.0",
|
|
18
18
|
"chalk": "^4.1.2",
|
|
19
19
|
"chokidar": "^3.5.3",
|