{"_id":"@aoo/mdx","_rev":"1-722495118f21933899fa765e26279d58","name":"@aoo/mdx","dist-tags":{"latest":"9.1.5-canary.15"},"versions":{"9.1.5-canary.15":{"name":"@aoo/mdx","version":"9.1.5-canary.15","main":"index.js","license":"MIT","repository":{"url":"git+https://github.com/zeit/next.js.git","directory":"packages/aoo-mdx"},"peerDependencies":{"@mdx-js/loader":">=0.15.0"},"description":"Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/next.js)","bugs":{"url":"https://github.com/zeit/next.js/issues"},"homepage":"https://github.com/zeit/next.js#readme","_id":"@aoo/mdx@9.1.5-canary.15","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-f4KCiCdqcQV6CeBtNMYj1OK+Tk+MMWDjQdf4xGQaMaiJy+tStl3zDVyq54NojMe4CDZtNzqPsrEHLb3dxulOow==","shasum":"5525fd93b9d769f4c0ec46f10688b73e87281e63","tarball":"https://registry.npmjs.org/@aoo/mdx/-/mdx-9.1.5-canary.15.tgz","fileCount":4,"unpackedSize":3366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7L+UCRA9TVsSAnZWagAA2Y4QAKP3i0DAiJLa1yNYOoMI\nPutsss1vU2yP517wZmmVtppjtQFFKKZnQaVeBrKd/ANDQnn1/8oIQFWEuyJ3\nhoE3o0XnrqnneC0W3FzaToq+gp1xNfyUC3yxEF9kxV4ZIuY2XHZqS3+GH3k6\n0UAM8LkOPMqiO3KdQ2tI7nnEji2EZ+puT+VJ9IEKJywhT/GHmFqawib7YXUi\neAQA7ewPt6UodNXhkm6XtnnZhT3UksYz/Hic/I/kPnVFX1nKS9bCjCCGMxdf\nkpzbNedXg/J7xLJphFm38KgefNZq2LRpAnd1hHMpRT2wUDebrk4m6o76lNwQ\nXr+OS4/vMb1d46JeQHdSPGX0KANVgMgtsmKadA0ikgriQCHHB4mdqhTfYl/6\nFIxqyEmqQ8TUftuOM2GCTXXwrNAMUAgcQJAizwS2OFb5wQRNeDATq1U5zNvd\na6mTckQQup/VA0Cdn0mDr26fGqvpwpMVOLNXf01mteSP4GmL8mA49pMtQxCk\nZfN1tZFfkc4ykQw2sEXFfQ/cM4Rh2NZmOrEJjNokZVhxgoVMDDzUvvU53uCf\noPaRc04HypKDEIl7Pz557P0yq4JNQ7Z/0ecMRjdYCo6HyRt/oReGc89gwhDg\nbj7ipoqJQGEsiQghg481MKJWBb319KlCA8wnqGoKrryXErP6KSyFazFrbrrD\nkfmO\r\n=MWJz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCC2id+VQzNtKCvJiAZG8/rWx08B8nc7Bqzy5Mu8PpvxwIhAKqcs0P/bjjhBjzt5GoHreWpZyJj/woCP3aT3gEy/Zwy"}]},"maintainers":[{"name":"zan","email":"anlasheng@gmail.com"}],"_npmUser":{"name":"zan","email":"anlasheng@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdx_9.1.5-canary.15_1575796627584_0.5886331855479863"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-08T09:17:07.345Z","9.1.5-canary.15":"2019-12-08T09:17:07.772Z","modified":"2022-04-04T14:30:00.968Z"},"maintainers":[{"name":"zan","email":"anlasheng@gmail.com"}],"description":"Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/next.js)","homepage":"https://github.com/zeit/next.js#readme","repository":{"url":"git+https://github.com/zeit/next.js.git","directory":"packages/aoo-mdx"},"bugs":{"url":"https://github.com/zeit/next.js/issues"},"license":"MIT","readme":"# Next.js + MDX\n\nUse [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/next.js)\n\n## Installation\n\n```\nnpm install --save @next/mdx @mdx-js/loader\n```\n\nor\n\n```\nyarn add @next/mdx @mdx-js/loader\n```\n\n## Usage\n\nCreate a `next.config.js` in your project\n\n```js\n// next.config.js\nconst withMDX = require('@next/mdx')()\nmodule.exports = withMDX()\n```\n\nOptionally you can provide [MDX options](https://github.com/mdx-js/mdx#options):\n\n```js\n// next.config.js\nconst withMDX = require('@next/mdx')({\n  options: {\n    mdPlugins: [],\n    hastPlugins: [],\n  },\n})\nmodule.exports = withMDX()\n```\n\nOptionally you can add your custom Next.js configuration as parameter\n\n```js\n// next.config.js\nconst withMDX = require('@next/mdx')()\nmodule.exports = withMDX({\n  webpack(config, options) {\n    return config\n  },\n})\n```\n\nOptionally you can match other file extensions for MDX compilation, by default only `.mdx` is supported\n\n```js\n// next.config.js\nconst withMDX = require('@next/mdx')({\n  extension: /\\.(md|mdx)$/,\n})\nmodule.exports = withMDX()\n```\n\n## Top level .mdx pages\n\nDefine the `pageExtensions` option to have Next.js handle `.mdx` files in the `pages` directory as pages:\n\n```js\n// next.config.js\nconst withMDX = require('@next/mdx')({\n  extension: /\\.mdx?$/,\n})\nmodule.exports = withMDX({\n  pageExtensions: ['js', 'jsx', 'mdx'],\n})\n```\n\n## Typescript\n\nFollow [this guide](https://mdxjs.com/advanced/typescript) from the MDX docs.\n","readmeFilename":"readme.md"}