-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update examples, react
#1415
Update examples, react
#1415
Conversation
* Update `react`, `react-dom` * Clean Next, Razzle, Vue examples * Update parcel example, parcel plugin, run tests * Prefer `.mdx` extension over `.md` * This does not yet touch CRA * It’s impossible to get Gatsby working in our workspace (they fork MDX but resolve from their dependency on old MDX) * I can’t get webpack 5 working either Related to GH-1292.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/ga6p75usz [Deployment for 5f5b158 failed] |
@@ -53,7 +53,7 @@ module.exports = { | |||
module: { | |||
rules: [ | |||
{ | |||
test: /\.mdx?$/, | |||
test: /\.mdx$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push our own extension.
Several tools already handle markdown (e.g., parcel), which we shouldn’t overwrite. And MDX is somewhat different, so it’s good to push the different extension
const MDX = require('@mdx-js/runtime') | ||
const {MDXProvider} = require('@mdx-js/react') | ||
|
||
const MDXContent = ` | ||
# Hello, world! | ||
|
||
From <Color bgBlack white bold> MDX! </Color> | ||
From <Text backgroundColor="black" color="white" bold>MDX!</Text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ink changed
@@ -1,29 +1,20 @@ | |||
<template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly a smaller, MVP, example
"scripts": { | ||
"test-api": "jest test", | ||
"test-coverage": "jest test --coverage", | ||
"test": "yarn test-coverage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this package had tests, but they were never tested
react
,react-dom
.mdx
extension over.md
Related to GH-1292.