2

I'm trying to import react-markdown, but I'm getting Error: Not supported

module.exports = import("react-markdown");

Screenshot of the problem

Jorengarenar
  • 2,705
  • 5
  • 23
  • 60

2 Answers2

0

You are exporting the react markdown library. In Next.js, you should not export libraries

DevGuyAhnaf
  • 141
  • 1
  • 2
  • 12
0

You can try importing the library first and export it directly (although I don't know why you would want to do that, as you can import it in the file where you're going to use the "exported library").

import ReactMarkdown from 'react-markdown'

module.exports = ReactMarkdown
Ziwon
  • 589
  • 6
  • 15