11dd1de655
`config.experimental.serverComponents` is currently required to be enabled or disabled together with `config.experimental.appDir` (which means `serverComponents === appDir` otherwise it will throw) so there is no reason to keep both of them. This PR removes `serverComponents` from Next.js and only rely on `appDir` instead. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
21 lines
386 B
JavaScript
21 lines
386 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
module.exports = {
|
|
reactStrictMode: true,
|
|
experimental: {
|
|
appDir: true,
|
|
},
|
|
async rewrites() {
|
|
return {
|
|
afterFiles: [
|
|
{
|
|
source: '/rewrite/edge',
|
|
destination: '/edge',
|
|
},
|
|
{
|
|
source: '/rewrite/api/edge',
|
|
destination: '/api/edge',
|
|
},
|
|
],
|
|
}
|
|
},
|
|
}
|