From 74b051f986536dc8ee2f3e05aec29d2a2b1baf0d Mon Sep 17 00:00:00 2001 From: Ryan Patterson Date: Wed, 4 May 2022 22:06:16 +0300 Subject: [PATCH] Add docs about nextRuntime for custom webpack This variable is exported by next but undocumented, and its usage is necessary to build auxiliary scripts for your server-side applications. See https://github.com/vercel/next.js/issues/36237#issuecomment-1117694528 for an example. --- docs/api-reference/next.config.js/custom-webpack-config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-reference/next.config.js/custom-webpack-config.md b/docs/api-reference/next.config.js/custom-webpack-config.md index 6b4535c7e80f5..b58065f3b46f6 100644 --- a/docs/api-reference/next.config.js/custom-webpack-config.md +++ b/docs/api-reference/next.config.js/custom-webpack-config.md @@ -36,6 +36,7 @@ The second argument to the `webpack` function is an object with the following pr - `buildId`: `String` - The build id, used as a unique identifier between builds - `dev`: `Boolean` - Indicates if the compilation will be done in development - `isServer`: `Boolean` - It's `true` for server-side compilation, and `false` for client-side compilation +- `nextRuntime`: `String` - The target runtime for server-side compilation; either `"edge"` or `"nodejs"` - `defaultLoaders`: `Object` - Default loaders used internally by Next.js: - `babel`: `Object` - Default `babel-loader` configuration