2

I want to use remark with "remark-breaks" (or any other plugins). I tried this in gatsby-config.js:

 ...        
  {
  resolve: "gatsby-transformer-remark",
  options: {
    plugins: [
      {
         resolve: "remark-breaks",
      }, 
      // "remark-breaks", //this doesn't work either.        
    ] 
  }

It said:

TypeError: Cannot read property 'Parser' of undefined

  • index.js:6 breaks [demo]/[remark-breaks]/index.js:6:21

  • extend-node-type.js:142 [demo]/[gatsby-transformer-remark]/extend-node-type.js:142:32

I can see that only gatsby's plugin may be used like this. Then how can I config remark with plugins of its own?

Derek Nguyen
  • 11,294
  • 1
  • 40
  • 64
pfcao
  • 21
  • 3

1 Answers1

0

Since a Gatsby remark plugin doesn't already exist for remark-breaks you'd have to look into developing your own: https://www.gatsbyjs.org/docs/plugin-authoring/