Vishesh Duggar bio photo

Vishesh Duggar

CTO Software @vamstar. 15 years in tech. Entrepreneurial with a keen interest in product development and usability. Interested in working on high impact ideas.

Subscribe to my mailing list

Are you looking for a tech advisor or a CTO?

Contact on LinkedIn

Vamstar LinkedIn Twitter Github

So I tried upgrading CRA for an existing app. I wanted to use the latest React Fast Refresh to hot reload react while making changes. Everything worked fine locally on the dev machine but the build failed on CircleCI while minifying.

It turned out to be a resourcing issue and Terser config had to be overridden without ejecting CRA of course.

Publishing the config I used borrowed from here.


const { override } = require('customize-cra');
const { addReactRefresh } = require('customize-cra-react-refresh');
const TerserPlugin = require('terser-webpack-plugin');

const overrideTerser = options => config => {

  config.optimization = {
    minimize: true,
    minimizer: [
      new TerserPlugin({
        terserOptions: {
          parse: {
            ecma: 8,
          },
          compress: {
            ecma: 5,
            warnings: false,
            comparisons: false,
            inline: 2,
            drop_console: true,
          },
          mangle: {
            safari10: true,
          },
          output: {
            ecma: 5,
            comments: false,
            ascii_only: true,
          },
        },
        parallel: 2,
        cache: true,
        sourceMap: true,
        extractComments: true,
      }),
    ],
  };
  return config;
};

/* config-overrides.js */
module.exports = override(addReactRefresh({ disableRefreshCheck: true }), overrideTerser());

Close to 15 years in tech; I've served as a CTO and advisor to multiple organizations. Brought close to 20 products to market. As a founding member of multiple organizations I've done everything from tech to stratgey, sales, marketing, hiring, accounting and more. Experience in a variety of technologies including but not limited to AWS, Node, React, Serverless, ElasticSearch, Groovy, Java, Typescript, Angular, Grails, PHP, Drupal, Wordpress.

Always interested in looking at new tech, strategy and ways I can add value to organizations.

[Contact me.](https://www.linkedin.com/in/experienced-cto/).