2
0

next.config.prod.cjs 954 B

1234567891011121314151617181920212223242526
  1. /**
  2. * Minimal Next.js config for production runtime.
  3. *
  4. * next.config.ts is the authoritative config used at build time (Turbopack rules,
  5. * transpilePackages, sassOptions, etc.). However, Next.js 16 tries to transpile
  6. * .ts configs at server startup, which fails in production where TypeScript is not
  7. * installed. assemble-prod.sh therefore deletes next.config.ts and renames this
  8. * file to next.config.js so the production server can load the runtime-critical
  9. * settings (i18n routing, pageExtensions, …) without a TypeScript toolchain.
  10. *
  11. * Keep the runtime-relevant values in sync with next.config.ts.
  12. */
  13. const nextI18nConfig = require('./config/next-i18next.config');
  14. const { i18n } = nextI18nConfig;
  15. /** @type {import('next').NextConfig} */
  16. module.exports = {
  17. reactStrictMode: true,
  18. poweredByHeader: false,
  19. pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
  20. i18n,
  21. serverExternalPackages: ['handsontable'],
  22. };