Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure config's
experimental
field exists (#34500)
Fixes #34499 Starting with `v12.1.0`, you can't use React 18 when you don't use the `experimental` field in the `next.config.js` ![image](https://user-images.githubusercontent.com/29319414/154569017-38f72690-6879-47d1-a0cd-09072af2967c.png) That's because [this recent change](1aee935) sets `reactRoot` on the user's config without checking if the key already exists: https://github.com/vercel/next.js/blob/787186a85a054ea870fc964583fe65e9f2286354/packages/next/server/config.ts#L679-L682 This change initializes `experimental` on the `userConfig` if necessary. ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
- Loading branch information