I have tried to import a markdown file into my typescript react-native project in 2 ways.
import * as readme from "./sample.md"
import readme from "./sample.md"
Both didn't work. So I found a similar issue reported previously and mentioned about making a typings.d.ts file for declaring modules, and i've tried this as well but it still doesn't work.
declare module "*!txt" { const value: any; export default value;}declare module "*.md" { const value: any; export default value;}
EDIT:There is no import error on Vscode but on the react-native app itself, it says that it cannot find module './sample.md' as it is only looking for (.native|.ios|.json|.ts etc) files.
Any help would be appreciated, been stuck on this for far too long.Thank you!