Capítulo 271 de 456
Wire a custom deployment adapter into a Next.js project by pointing next.config.js (or an env var) at the adapter module.
adapterPath: next.config.js option set to require.resolve('./my-adapter.js'), the path to your adapter module.NEXT_ADAPTER_PATH: environment variable alternative that enables zero-config adapter usage on deployment platforms (no next.config.js edit needed)./** @type {import('next').NextConfig} */
const nextConfig = {
adapterPath: require.resolve('./my-adapter.js'),
}
module.exports = nextConfig
require.resolve: breaks when the config is loaded from a different working directory; require.resolve guarantees an absolute, resolvable path.adapterPath in config, or NEXT_ADAPTER_PATH env var for platform-level zero-config wiring.modifyConfig/onBuildComplete hooks (see ch272).NextAdapter interface this path points to.