Concept of Barreling MDX files? #1965
Replies: 3 comments
-
I'm not quite sure what you mean by "barreling" the file. Could you expand a bit more? I'm assuming you mean you want to compile a JavaScript file and run it through another tool, before rendering it to the page? |
Beta Was this translation helpful? Give feedback.
-
@ChristianMurphy thanks for the response. I am looking to have a bunch of MDX component files in a "library" and import them using a path like so...
Just like you are able to do with JS and ts barreling and tsconfig pathing. |
Beta Was this translation helpful? Give feedback.
-
You don't have to
Pathing depends on the build tool you are using, not the mdx language itself, for example WebPack loaders can be configured to create absolute paths or aliases for specific folders. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Is there a concept of barreling MDX files for consumption? I am wondering if there is a way to use tsconfig paths to import mdx files as components.
Beta Was this translation helpful? Give feedback.
All reactions