Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

customize-cra

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customize-cra

[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is customize-cra?

The customize-cra package is a utility for customizing Create React App (CRA) configurations without ejecting. It allows you to override the default Webpack configuration, Babel configuration, and other settings in a CRA project.

What are customize-cra's main functionalities?

Override Webpack Configuration

This feature allows you to override the default Webpack configuration. In this example, a Webpack alias is added to simplify imports from the 'src/components' directory.

const { override, addWebpackAlias } = require('customize-cra');
const path = require('path');

module.exports = override(
  addWebpackAlias({
    ['@components']: path.resolve(__dirname, 'src/components')
  })
);

Modify Babel Configuration

This feature allows you to modify the Babel configuration. In this example, the 'babel-plugin-styled-components' plugin is added to the Babel configuration.

const { override, addBabelPlugin } = require('customize-cra');

module.exports = override(
  addBabelPlugin('babel-plugin-styled-components')
);

Add PostCSS Plugins

This feature allows you to add PostCSS plugins to the configuration. In this example, the 'postcss-preset-env' plugin is added.

const { override, addPostcssPlugins } = require('customize-cra');

module.exports = override(
  addPostcssPlugins([require('postcss-preset-env')])
);

Other packages similar to customize-cra

FAQs

Package last updated on 28 May 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc