配置
配置 adapterPath 或 NEXT_ADAPTER_PATH 以使用自定义部署适配器。
要使用适配器,请在 adapterPath 中指定适配器模块的路径:
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
adapterPath: require.resolve('./my-adapter.js'),
}
module.exports = nextConfig或者,可以设置 NEXT_ADAPTER_PATH,以便在部署平台上实现零配置使用。