UglifyJS fails to minify library files
I enjoy using react-request in my project, thanks for creating it!
I decided to try the new version 3 today, but UglifyJS fails to minify it because of the let keywords in the CommonJS version of the library.
I think it happens because the babel-env plugin configuration is missing the targets section and newer language features are not transpiled.
I am going to amend my configuration to transpile the new react-request version, but it would be nice to have it transpiled out of the box. Moreover, the majority of bundler configuration docs and tutorials assume the code in node_modules is already transpiled to ES5.

I was wrong, the issue is not related to version 3 only because the let keyword was introduced in February commit.
Still, would you consider transpiling the library files to ES5?
I've solved the issue for my project by importing react-request/dist/react-request.js which is already transpiled.
Hi @illarionvk ! I’ll look into this. Sorry for the trouble!
Can you share more information about your build step? Are you using webpack? How are you running Uglify? What version of Uglify? And so on. Thanks!
Hi @jamesplease! I'm using Browserify and UglifyJS 3. Uglify supports ES5 only.
Webpack users might experience the issue too because most configurations exclude the node_modules folder in babel-loader config.
The files from your /dist folder are transpiled to ES5 and work well for me.
Thanks for providing more details @illarionvk . I agree that the other folders should also be transpiled down to ES5, but I am glad you found a workaround in the meantime.