🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-app-rewire-uglifyjs

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-app-rewire-uglifyjs

Add uglifyjs-webpack-plugin to create-react-app using react-app-rewired

0.1.1
latest
Version published
Maintainers
1
Created

react-app-rewire-uglifyjs

npm version npm downloads

create-react-app doesn't support tree-shaking because it uses webpack's builtin uglifyjs plugin. This library will replace it with uglifyjs-webpack-plugin and enable tree shaking to your cra project!

Install

$ yarn add react-app-rewire-uglifyjs --dev
or
$ npm install --only=dev react-app-rewire-uglifyjs

Add it to your project

const rewireUglifyjs = require('react-app-rewire-uglifyjs');

/* config-overrides.js */
module.exports = function override(config, env) {
  config = rewireUglifyjs(config);
  return config;
}

FAQs

Package last updated on 25 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts