-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixed ES6 and CJS causes issues in some enviroments #8
Comments
I guess # 1 is out. It appears it is not possible to extend native classes using Babel. |
I"ve looked in detail at this issue. There are several things at play:
All this to say when using mljs tools in the browser minification (a common build step for browsers) is not possible as far as I can tell. I don't see a solution at the moment other than "don't minify". You might want to add this as a note somewhere. Feel free to close this issue. |
Hello @Hypercubed, thanks for all the research and for use our packages, we'll add this request and as soon as we have any solution we'll notify this to you. Thanks again! |
Thanks for the detailed description of your problem. UglifyJS is actively working on a version that can handle ES6 here. I will look into it and see what can be done with it. |
@Hypercubed there were a few bug with the harmony branch of UglifyJS preventing the minification of |
I believe this is working. However, in my app |
Indeed, the issue I am now having is unrelated to ml-matrix: mishoo/UglifyJS#1228 |
I managed to get ml-matrix@1.1.5 to transpile using babel-plugin-transform-builtin-extend. I had no luck with 2.0.0. I think the abstractMatrix abstraction is too much for the plugin. |
Thank you for ml-pca, we are using it in a browser project and so far looks great. One issue we are having, however, is that the JS files in ml-pca and ml-matrix use ES6 features within a CJS file. When using JSPM/SystemJS in the browser this means that the files are detected as CJS and not transpiled.
Here is a relevant SystemJS issue: systemjs/systemjs#811
One your end I can see three approaches:
The text was updated successfully, but these errors were encountered: