Hi,
Freecodecamp suggest the use of marked.js for this project so I’ve tried to use it but I’m getting an error.
the code:
var marked = require('marked');
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: false,
smartLists: true,
smartypants: false
});
console.log(marked('I am using __markdown__.'));
the error:
require is not defined
I change the JavaScript Preprocessor to babel and added React and reactDom but nothing changes.
I don’t know if I’m supposed to use react or not.( I have never used react)
Thanks.