next.config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. },
  20. // fix all before production. Now it slow the develop speed.
  21. eslint: {
  22. // Warning: This allows production builds to successfully complete even if
  23. // your project has ESLint errors.
  24. ignoreDuringBuilds: true,
  25. dirs: ['app', 'bin', 'config', 'context', 'hooks', 'i18n', 'models', 'service', 'test', 'types', 'utils'],
  26. },
  27. typescript: {
  28. // https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
  29. ignoreBuildErrors: true,
  30. },
  31. async redirects() {
  32. return [
  33. {
  34. source: '/',
  35. destination: '/apps',
  36. permanent: false,
  37. },
  38. ]
  39. },
  40. output: 'standalone',
  41. }
  42. module.exports = withMDX(nextConfig)