I am trying to create a remark-plugin that allows having image-files right next to .md files.
export default function (pluginOptions) {
const transformer = (tree, file) => {
console.log('Transformer data:');
console.log(file.path); // -> returns undefined
};
return transformer;
}
What version of
astroare you using?1.0.0-beta.20
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Whatever StackBlitz uses
Describe the Bug
Intention:
I am trying to create a remark-plugin that allows having image-files right next to .md files.
Approach:
file.pathshould return well the file path. But it seems in Astro it doesn't (see StackBlitz)Relevant bit of code:
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-3cnfvx-nsf5xw?file=custom-remark-plugin/index.mjs
Participation