Skip to content

Commit

Permalink
dedent literal + docs change
Browse files Browse the repository at this point in the history
  • Loading branch information
axdg committed Aug 9, 2019
1 parent f3344bd commit 5eeebb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ const {getOptions} = require('loader-utils')
const mdx = require('@mdx-js/mdx')

const DEFAULT_PREPEND = `
import React from 'react'
import { mdx } from '@mdx-js/react'
import React from 'react'
import { mdx } from '@mdx-js/react'
`
.split('\n')
.map(l => l.trim())

const loader = async function(content) {
const callback = this.async()
Expand Down
2 changes: 1 addition & 1 deletion packages/loader/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import React from 'react'
import { mdx } from '@mdx-js/react'
```

One could use any other implementation. The example below wraps a generic JSX compatible function named `h`.
Using the `prepend` option, one can swap out React for another implementation. The example below wraps a generic JSX compatible function named `h`.

```js
const prepend = `
Expand Down

0 comments on commit 5eeebb1

Please sign in to comment.