next.config.js 661 B

123456789101112131415161718192021222324252627
  1. import createMDX from "@next/mdx";
  2. /** @type {import('next').NextConfig} */
  3. const nextConfig = {
  4. serverExternalPackages: ["bash-tool", "just-bash", "@mongodb-js/zstd"],
  5. pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
  6. async redirects() {
  7. return [
  8. {
  9. source: "/docs/components",
  10. destination: "/docs/registry",
  11. permanent: true,
  12. },
  13. {
  14. source: "/docs/actions",
  15. destination: "/docs/registry#action-handlers",
  16. permanent: true,
  17. },
  18. ];
  19. },
  20. };
  21. const withMDX = createMDX({});
  22. /** @type {import('next').NextConfig} */
  23. const config = withMDX(nextConfig);
  24. export default config;