You can not import md file, because import for only on javascript files.
You need use some markdown parser or write your own. For example markdown-it:
var MarkdownIt = require('markdown-it');
var md = new MarkdownIt();
var result = md.parse('# markdown-it rulezz!');
console.log(result);
You will get:
[Token {
type: 'heading_open',
tag: 'h1',
attrs: null,
map: [0, 1],
nesting: 1,
level: 0,
children: null,
content: '',
markup: '#',
info: '',
meta: null,
block: true,
hidden: false
},
Token {
type: 'inline',
tag: '',
attrs: null,
map: [0, 1],
nesting: 0,
level: 1,
children: [[Object]],
content: 'markdown-it rulezz!',
markup: '',
info: '',
meta: null,
block: true,
hidden: false
},
Token {
type: 'heading_close',
tag: 'h1',
attrs: null,
map: null,
nesting: -1,
level: 0,
children: null,
content: '',
markup: '#',
info: '',
meta: null,
block: true,
hidden: false
}]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…