Skip to content

Commit

Permalink
Add browser docs for webpack, closes #536
Browse files Browse the repository at this point in the history
  • Loading branch information
johno committed Jul 12, 2019
1 parent 534012c commit b263faf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/getting-started/webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ by adding in the babel-loader to run *after* the MDX loader. Webpack starts
from the end of the loaders array and works backward, so it is important to
follow the ordering above.

## Running MDX in the browser

If you’re running MDX in the browser you will need to configure webpack to ignore
the `fs` module:

```js
module.exports = {
node: {
fs: 'empty'
}
}
```

[See the webpack docs](https://webpack.js.org/configuration/node/#other-node-core-libraries)

<BabelConfig />

[babel-loader]: https://webpack.js.org/loaders/babel-loader/
Expand Down

0 comments on commit b263faf

Please sign in to comment.