mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Move `adapterPath` from experimental to stable Graduates `adapterPath` from `experimental.adapterPath` to a top-level `NextConfig` option, following the same pattern used for `cacheHandlers`, `cacheComponents`, `typedRoutes`, and other options that moved out of experimental. ### Changes - **Type definition** (`config-shared.ts`): Added `adapterPath` to `NextConfig` interface, marked `ExperimentalConfig.adapterPath` as `@deprecated`, moved default value to top-level in `defaultConfig`, updated `NextConfigRuntime` and `getNextConfigRuntime` - **Zod schema** (`config-schema.ts`): Added `adapterPath` to top-level `configSchema` - **Backward compat** (`config.ts`): Added `warnOptionHasBeenMovedOutOfExperimental` call so existing `experimental.adapterPath` configs still work with a deprecation warning, updated `applyModifyConfig` to read from `config.adapterPath` - **Runtime references**: Updated `build/index.ts`, `app-page.ts`, `app-route.ts`, `pages-handler.ts` to use `config.adapterPath` / `nextConfig.adapterPath` - **Tests**: Updated 4 test fixture `next.config` files - **Docs**: Updated app router doc (removed `version: experimental` frontmatter, top-level config example), pages router doc title, and v16 upgrade guide
17 lines
309 B
JavaScript
17 lines
309 B
JavaScript
module.exports = {
|
|
rewrites() {
|
|
return [
|
|
{
|
|
source: '/rewrite-me',
|
|
destination: '/',
|
|
},
|
|
{
|
|
source: '/rewrite-me-dynamic',
|
|
destination: '/first',
|
|
},
|
|
]
|
|
},
|
|
adapterPath:
|
|
process.env.NEXT_ADAPTER_PATH ?? require.resolve('./my-adapter.js'),
|
|
}
|