Unverified Commit d1db7141 authored by Ryan Patterson's avatar Ryan Patterson Committed by GitHub

Add docs about nextRuntime for custom webpack (#36685)

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.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
parent 2012f4e7
...@@ -36,6 +36,7 @@ The second argument to the `webpack` function is an object with the following pr ...@@ -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 - `buildId`: `String` - The build id, used as a unique identifier between builds
- `dev`: `Boolean` - Indicates if the compilation will be done in development - `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 - `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: - `defaultLoaders`: `Object` - Default loaders used internally by Next.js:
- `babel`: `Object` - Default `babel-loader` configuration - `babel`: `Object` - Default `babel-loader` configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment