Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @next/mdx to use mdx in Next.js #568

Merged
merged 4 commits into from May 7, 2019

Conversation

Projects
None yet
4 participants
@mottox2
Copy link
Contributor

commented May 4, 2019

@zeit/next-mdx is now deprecated.
We should use @next/mdx so I fixed documentation.

@now

This comment has been minimized.

Copy link

commented May 4, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://mdx-git-fork-mottox2-patch-1.mdx.now.sh

@wooorm

wooorm approved these changes May 4, 2019

Copy link
Member

left a comment

LGTM, although it looks like the docs for @next/mdx are outdated (they seem to use the loader before 1.0.0)

@chibicode

This comment has been minimized.

Copy link

commented May 4, 2019

@mottox2 Hi! Thank you for this PR. プルリクありがとうございます! I noticed that next-mdx is already in master, so:

-https://github.com/zeit/next.js/tree/canary/packages/next-mdx
+https://github.com/zeit/next.js/tree/master/packages/next-mdx

We also should update files in the examples directory as well.

examples/next/next.config.js:

-const withMDX = require('@zeit/next-mdx')({
+const withMDX = require('@next/mdx')({

examples/next/package.json:

-"@zeit/next-mdx": "^1.2.0",
-"next": "^8.0.4",
+"@next/mdx": "^8.1.0",
+"next": "^8.1.0",

Then run yarn install from the top level to update yarn.lock.

@wooorm Their package.json is outdated, but their doc suggests you to install @mdx-js/loader alongside @next/mdx, so it still works.

mottox2 added some commits May 5, 2019

@mottox2

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2019

Thank you for reviewing. After This PR is merged, I will try to update @mdx-loader in @next/mdx.

@johno

This comment has been minimized.

Copy link
Member

commented May 7, 2019

Thanks!

@johno johno merged commit 7433324 into mdx-js:master May 7, 2019

2 checks passed

now Deployment has completed
Details
now/package.json is ready
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.