0

I am trying to mangle my code using UglifyJS.
The libraries i include are (some) Ramda, React, Underscore, react-select ...

However when i mangle the code, in RamdaJS "output" section it gives me the error :

First argument to arity must be a non-negative integer no grater than ten

The uglifyjs config i am using with webpack is :

new webpack.optimize.UglifyJsPlugin({
        //include: /\.min\.js$/,
        //compress: {
        //    //sequences: true,
        //    //dead_code: true,
        //    //conditionals: true,
        //    //booleans: true,
        //    //unused: true,
        //    //if_return: true,
        //    //join_vars: true,
        //    drop_console: true
        //},
        mangle:{
            props:{
                //ignore_quoted:true,
                reserved:["$","$<","$@","require","import","jQuery","module","_arity","exports","R","ramda","call","prototype","init","_","__"]
            }
        }
})

I am using ramda 0.13.

Is anyone out there that knows what the problem is?
If i don't mangle the code, everything works and passes all my tests

Razvan
  • 670
  • 3
  • 9
  • 23
  • What Ramda function are you trying to use? – Scott Sauyet Jan 13 '17 at 18:28
  • Also note that v0.13 of Ramda is nearly two years old, which is a lifetime in a fast-moving project! – Scott Sauyet Jan 13 '17 at 18:29
  • @ScottSauyet Hi, i know my version of ramda is old but even if i update it it still gives me an error. The problem is the fact that the MANGLER mangles ( :) ) ramda's properties. UglifyJS should mangle only what i give it to mangle not decide it self. I will post my solution tonight when i hopefully finish what i intended to do with this mangler. Thanks :) – Razvan Jan 16 '17 at 07:42
  • 1
    Note that individual Ramda functions can be included with, for instance, `require ('ramda/src/map')`. – Scott Sauyet Jan 16 '17 at 15:37

0 Answers0