showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.34k stars 1.57k forks source link

NPM installation browser support #990

Open gyenabubakar opened 1 year ago

gyenabubakar commented 1 year ago

Is there a reason the NPM package only runs on the server side? Since you're able to build for CDN, it's possible to build it so it can be used in frontend projects using ES module imports, right?

I'm working on the frontend and I'd like to be able to import showdown in a Vue/React/Svelte app without putting a script:src in my HTML and also get intellisense.

milkpotatoes commented 11 months ago

use import showdown from 'showdown' to import showdown is supported

wykopx commented 7 months ago

use import showdown from 'showdown' to import showdown is supported

@milkpotatoes well actually it doesn't work:

Uncaught SyntaxError: The requested module 'showdown' does not provide an export named 'default'