next.config.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. const withMDX = require('@next/mdx')({
  2. extension: /\.mdx?$/,
  3. options: {
  4. // If you use remark-gfm, you'll need to use next.config.mjs
  5. // as the package is ESM only
  6. // https://github.com/remarkjs/remark-gfm#install
  7. remarkPlugins: [],
  8. rehypePlugins: [],
  9. // If you use `MDXProvider`, uncomment the following line.
  10. // providerImportSource: "@mdx-js/react",
  11. },
  12. })
  13. /** @type {import('next').NextConfig} */
  14. const nextConfig = {
  15. productionBrowserSourceMaps: false, // enable browser source map generation during the production build
  16. // Configure pageExtensions to include md and mdx
  17. pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
  18. experimental: {
  19. appDir: true,
  20. },
  21. // fix all before production. Now it slow the develop speed.
  22. eslint: {
  23. // Warning: This allows production builds to successfully complete even if
  24. // your project has ESLint errors.
  25. ignoreDuringBuilds: true,
  26. dirs: ['app', 'bin', 'config', 'context', 'hooks', 'i18n', 'models', 'service', 'test', 'types', 'utils'],
  27. },
  28. typescript: {
  29. // https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
  30. ignoreBuildErrors: true,
  31. },
  32. async redirects() {
  33. return [
  34. {
  35. source: '/',
  36. destination: '/apps',
  37. permanent: false,
  38. },
  39. ]
  40. },
  41. output: 'standalone',
  42. }
  43. module.exports = withMDX(nextConfig)