mljs/ml

Is there a transpiled version (or older version) without ES5 code?

zyxue opened this issue · 2 comments

zyxue commented

I am using this library with create-react-app, but it causes a problem when I tried to compile my code into a production build, because uglifyjs in used by create-react-app doesn't work with ES5 code. See more discussion on

facebook/create-react-app#1125

Until then I recommend to use libraries that take care of transpilation step.

I am mainly looking at the Matrix and PCA functionality currently.

Or if you have idea on transpilation (e.g. with babel), please provide some guidance, and I could try it myself.

I don't use create-react-app but if you can play with the webpack config, I suggest you to replace uglifyjs with babili. That's what we use to minify our applications.
https://github.com/webpack-contrib/babili-webpack-plugin

zyxue commented

Thanks for the tip. Babili seems promising, but for now, I reimplemented the few functions I needed (matrix transpose and PCA) myself.