mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
20 lines
396 B
JavaScript
20 lines
396 B
JavaScript
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
module.exports = {
|
|
trailingSlash: true,
|
|
rewrites: async () => {
|
|
const isCacheComponentsEnabled =
|
|
process.env.__NEXT_CACHE_COMPONENTS === 'true'
|
|
|
|
return [
|
|
{
|
|
source: '/:lang(en|es)/',
|
|
destination: isCacheComponentsEnabled
|
|
? '/:lang/cache-components/'
|
|
: '/:lang/legacy/',
|
|
},
|
|
]
|
|
},
|
|
}
|