Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

next.config.js 1.6KB

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