Another tip upgrading for Nextjs 10.2 to Nextjs 12

When setting up this blog, which was initially a version before Nextjs version 12, I had a webpack property in my withMDX config like so:

module.exports = withMDX({
    webpack: (config, { isServer }) => {
        if (!isServer) {
        config.node = {
        fs: 'empty'
            }
        }
    return config
    },
  pageExtensions: ['js', 'jsx', 'mdx'],
  target: 'serverless',
})

The versions of Nextjs that use Webpack 5 (version 11 and up), Nextjs handles path and url for you so you don't need the webpack config in MDX, which is managing this.