Closed nwalters512 closed 1 year ago
So, we do actually construct a VFile
instance internally. Maybe we can update serialize()
to accept a string
or a VFile
instance, like MDX's compile()
does. Happy to take a look at a PR if you're up to take a crack at it!
@BRKalow great! I opened a PR adding this: #311.
I have a plugin that relies on knowing the path to the file being compiled. In
next-mdx-remote
v3, I was able to providefilepath
viamdxOptions
, e.g.:As of MDX v2, however,
filepath
isn't an option anymore, and that's been replaced by passing a VFile object (https://mdxjs.com/migrating/v2/):I would like to be able to provide a filepath, either by passing a
VFile
object directly toserialize
, or by adding support for afilepath
key in the second argument toserialize
.