next.js/test/e2e/app-dir/trailingslash/next.config.js
next.config.js20 lines396 B
/**
 * @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/',
      },
    ]
  },
}
Quest for Codev2.0.0
/
SIGN IN