Nocturnal Pumpkin Maelstrom

    react-app-rewire-uglifyjs

    0.1.1 • Public • Published

    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

    1. Rewire your app
    2. modify config-overrides.js
    const rewireUglifyjs = require('react-app-rewire-uglifyjs');
     
    /* config-overrides.js */
    module.exports = function override(config, env) {
      config = rewireUglifyjs(config);
      return config;
    }

    Keywords

    none

    Install

    npm i react-app-rewire-uglifyjs

    DownloadsWeekly Downloads

    751

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    4.27 kB

    Total Files

    5

    Last publish

    Collaborators

    • kimxogus