I would like to load a markdown file from the current directory as a string, use case:
import { State } from "markup-it" ;
import markdown from "markup-it/lib/markdown";
import bio from './Bio.md'
const mdParser = State.create(markdown);
const bio_o = mdParser.deserializeToDocument(bio);
// tried this next: but cannot import files system because react stubbed it out
const fs = require('fs');
When I import bio from './Bio.md' I get path to file, not a string format. So next I try using the file system fs a la : require file as string but apparently fs has been stubbed out by react. So now I am completely stumped in terms of how I can import a file from the file system as a string. Am I missing something conceptually here? is it because I'm on the client side?