ml icon indicating copy to clipboard operation
ml copied to clipboard

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

Open zyxue opened this issue 7 years ago • 2 comments

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

https://github.com/facebookincubator/create-react-app/issues/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.

zyxue avatar Jun 04 '17 17:06 zyxue

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

targos avatar Jun 07 '17 06:06 targos

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

zyxue avatar Jun 07 '17 15:06 zyxue