Skip to content

Instantly share code, notes, and snippets.

@jamesmcallister
Created July 10, 2016 08:33
Show Gist options
  • Save jamesmcallister/1e568dbe64473f5fe90aa8a8108ac03b to your computer and use it in GitHub Desktop.
Save jamesmcallister/1e568dbe64473f5fe90aa8a8108ac03b to your computer and use it in GitHub Desktop.
webpack markdown
import React, { Component } from 'react';
import fileurl from './readme.md'
class Markdown extends Component {
rawMarkup() {
return { __html: fileurl };
}
render() {
return (
<div dangerouslySetInnerHTML={this.rawMarkup() } />
);
}
}
export default Markdown
{test: /\.md$/, loader: "html!markdown?gfm=false" },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment