4 Replies
Advanced Features: Using MDX | Next.js
Learn how to use @next/mdx in your Next.js project.
yeah i've tried that but not sure how to structure this part
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
remarkPlugins: [],
rehypePlugins: [],
// If you use
MDXProvider, uncomment the following line.
// providerImportSource: "@mdx-js/react",
},
})
module.exports = withMDX({
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
})
because t3 nextjs config looks different
for example eslint yells at me when im pasting this part const withMDX = require('@next/mdx')
and im not sure where put the module.exports = withMDX({
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
})
if i have something like this:
export default defineNextConfig({
images: {
domains: ['spoonacular.com'],
},
reactStrictMode: true,
swcMinify: true,
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing
i18n: {
locales: ["en"],
defaultLocale: "en",
},
});
You would need to convert them to import syntax to start
As for the rest I'm not 100% sure
These with wrappers are interesting I'm not use to this kind of API
@needmorewood okay thx!