valeriangalliat / markdown-it-highlightjs

Preset to use highlight.js with markdown-it.
The Unlicense
54 stars 30 forks source link

Please, can You add ES5 code? #3

Closed mbackonja closed 6 years ago

mbackonja commented 7 years ago

Hi,

I'm happy to use this package in my project, but I have problem with UglifyJsPlugin. UglifyJsPlugin can only uglify ES5 code but Your code is written in ES6. You should deliver ES5 code if You are pushing it to NPM.

My temporary solution is to config webpack like this:

{
    test: /\.js$/,
    loader: 'babel-loader',
    exclude: /node_modules\/(?!markdown-it-highlightjs)/
}

But please, add ES5 code to dist or lib folder.

https://stackoverflow.com/questions/29738381/how-to-publish-a-module-written-in-es6-to-npm https://booker.codes/how-to-build-and-publish-es6-npm-modules-today-with-babel/

valeriangalliat commented 6 years ago

You should use the 2.0.0 version of this package which supports ES5.

ES5 is not supported as of 3.0.0 but there's no new feature other than being written in ES5.