diff --git a/next.config.js b/next.config.js index 36983eb..426c56a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,9 @@ +const withMDX = require('@next/mdx')() + /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { + pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], serverComponentsExternalPackages: ['sequelize', 'sequelize-typescript', 'bcrypt', '@sequelize/core', '@/app/lib/api/error'], serverActions: { @@ -12,4 +15,5 @@ const nextConfig = { }, } -module.exports = nextConfig + +module.exports = withMDX(nextConfig) diff --git a/package.json b/package.json index a9a7672..f9ad7a4 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,14 @@ "lint": "next lint" }, "dependencies": { + "@mdx-js/loader": "^3.0.1", + "@mdx-js/react": "^3.0.1", + "@next/mdx": "^14.2.3", "@sequelize/core": "^7.0.0-alpha.40", "@sequelize/sqlite3": "^7.0.0-alpha.40", "@types/bcrypt": "^5.0.0", "@types/cookie": "^0.5.1", + "@types/mdx": "^2.0.13", "@types/node": "20.14.0", "@types/react": "18.2.30", "@types/react-bootstrap": "^0.32.32", @@ -31,6 +35,7 @@ "mysql": "^2.18.1", "mysql2": "^3.3.3", "next": "14.1.4", + "next-mdx-remote": "^5.0.0", "next-swagger-doc": "^0.4.0", "openapi-types": "^12.1.3", "pg-hstore": "^2.3.4", @@ -38,6 +43,7 @@ "react": "18.2.0", "react-bootstrap": "^2.7.4", "react-dom": "18.2.0", + "react-hot-toast": "^2.4.1", "sqlite": "^4.2.1", "swagger-jsdoc": "^6.2.8", "swagger-ui-react": "^5.17.2", diff --git a/tsconfig.json b/tsconfig.json index 56debde..4cc23d4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,6 @@ "@/*": ["./src/*"], } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app/admin/page.tsx.bak", "src/app/admin/[...slug]/page.tsx.bak"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/components/shared/news/article.mdx"], "exclude": ["node_modules"] }