node.jsnpmshowdown

nodeJS using NPM modules in external script files


I am working on a markdown converter application, and using an NPM package showdown. In my app.js file I have a var showdown = require('showdown'); which is properly being added. In my front end I require a script.js which needs to use this. However, it doesn't recognize the showdown variable. The code works perfectly if I use the showdown cdn above where I include my script.js. How do I make it so that my NPM modules can be used across a project?


Solution

  • Here's your answer. I have forked your git repo and made changes.