remark-obj-loader
A markdown loader for WebPack using remark. It exports an object contain two entries:
html
: containing the HTML representation of markdownattrs
: containing frontmatter attributes
Installation instructions
- npm:
npm install -D remark remark-obj-loader
- yarn:
yarn add -D remark remark-obj-loader
Options
remark-obj-loader has a single option: plugins
. Any passed remark plugins will be applied to the markdown body before being converted into html.
Configuration Examples
webpack.config.js
const RemarkFencedDivs =const RemarkUnwrapImages =moduleexports =//...module:rules:test: /\.md$/use:loader: 'remark-obj-loader'options:plugins: RemarkFencedDivs RemarkUnwrapImages// ...
vue.config.js
const RemarkFencedDivs =const RemarkUnwrapImages =moduleexports =// ...{configmoduleoptionsplugins:RemarkFencedDivsRemarkUnwrapImages}// ...