-
-
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
Create React App instructions shouldn't recommend "rewired" #358
Comments
Hey there, I made the mdx.macro package, but I'm really not sure that the docs should point to it because it doesn't currently work properly, and won't unless a new feature is added to babel itself. You can see more details on this in these two issues on create-react-app. The gist is, if a macro reads a separate file, there's currently no way to watch that file for changes. This means that it's possible to load an MDX file with mdx.macro, but you then have to manually restart the server each time that you change it. I've spent a day trying various hacks because I really want this feature myself, but haven't come up with anything that works. I honestly think that CRA jumped the gun by advertising MDX support via babel-macros. I've spent a lot of time trying to make it work, but for anything production related it's just not ready. Imo, "rewired" with CRA1 or the unsupported loader syntax with CRA2 (i.e. |
Thanks for the added details @jamesknelson, I'm going to reopen this until the missing features are added and we get live reload support on imported files. |
* Use mdx.macro for create-react-app example Closes #358 * Update surrounding documentation * Fix linting * Nuke esling config in cra so it doesn't get picked up
I'm going to go ahead and close this for now since there's not much actionable I can do on MDX's end right now. I've subscribed to the other issues linked so I can keep an eye on them. Right now I don't have the time/bandwidth to attempt a fix in babel core or |
https://mdxjs.com/getting-started/create-react-app#create-react-app
The "rewired" package has never been supported. CRA 2.0 supports Babel Macros and MDX was one of the reasons we added it — would be nice if the guide recommended the official solution. Thanks!
The text was updated successfully, but these errors were encountered: