-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
✨enhancementNew feature or requestNew feature or request
Description
From a recent discussion on twitter: https://twitter.com/kentcdodds/status/1026817174717968386?s=20
It would be cool to be able to "import" mdx files without needing to use webpack:
API:
import React from 'react';
import {inline} from 'inline-mdx.macro';
const MDX = inline('./my-markdown-asset.md[x]');
render(
<MDX />
);
I assume we would need to wrap our current "quasis" logic here which is handling tagged template literals in a conditional to verify that the user has in fact used the tagged template string vs use inline
as a function and then fs.readFileSync
the file and parse it as MDX.
Metadata
Metadata
Assignees
Labels
✨enhancementNew feature or requestNew feature or request