You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since marked's output is HTML, it's best served in conjunction with the [html-loader](https://github.com/webpack/html-loader).
20
22
21
-
### Webpack 2+
22
-
23
-
```javascript
24
-
{
25
-
module: {
26
-
rules: [
27
-
{
28
-
test:/\.md$/,
29
-
use: [
30
-
{
31
-
loader:"html-loader",
32
-
},
33
-
{
34
-
loader:"markdown-loader",
35
-
options: {
36
-
/* your options here */
37
-
},
38
-
},
39
-
],
40
-
},
41
-
];
42
-
}
43
-
}
44
-
```
45
-
46
-
### Options
47
-
48
-
Pass your marked [options](https://marked.js.org/#/USING_ADVANCED.md#options) as shown above.
49
-
In order to specify [custom renderers](https://github.com/peerigon/markdown-loader/issues/5), set the `options.renderer`-option in your webpack config.
50
-
51
23
```javascript
52
24
// webpack.config.js
53
-
54
-
constmarked=require("marked");
55
-
constrenderer=newmarked.Renderer();
56
-
57
-
module.exports= {
25
+
exportdefault {
58
26
module: {
59
27
rules: [
60
28
{
@@ -66,8 +34,8 @@ module.exports = {
66
34
{
67
35
loader:"markdown-loader",
68
36
options: {
69
-
pedantic:true,
70
-
renderer,
37
+
// Pass options to marked
38
+
// See https://marked.js.org/using_advanced#options
0 commit comments