mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Keep reading `config.experimental.outputHashSalt` for now to not break existing adapters until they are migrated.
20 lines
568 B
JavaScript
20 lines
568 B
JavaScript
// @ts-check
|
|
/** @type {import('next').NextAdapter } */
|
|
const myAdapter = {
|
|
name: 'my-custom-adapter',
|
|
modifyConfig: (config) => {
|
|
if (process.env.ADAPTER_HASH_SALT != null) {
|
|
config.outputHashSalt =
|
|
(config.outputHashSalt ?? '') + process.env.ADAPTER_HASH_SALT
|
|
}
|
|
if (process.env.EXPERIMENTAL_OUTPUT_HASH_SALT_CONFIG != null) {
|
|
config.experimental.outputHashSalt =
|
|
(config.experimental.outputHashSalt ?? '') +
|
|
process.env.EXPERIMENTAL_OUTPUT_HASH_SALT_CONFIG
|
|
}
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default myAdapter
|