Socket
Socket
Sign inDemoInstall

@craco/craco

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@craco/craco

Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.


Version published
Weekly downloads
400K
decreased by-1.04%
Maintainers
2
Weekly downloads
 
Created

What is @craco/craco?

@craco/craco is a configuration layer for Create React App (CRA) that allows you to customize the default CRA configuration without ejecting. It provides a way to override the Webpack configuration, Babel configuration, and other settings in a more flexible and maintainable way.

What are @craco/craco's main functionalities?

Webpack Configuration Override

This feature allows you to override the default Webpack configuration provided by Create React App. In this example, the CracoLessPlugin is used to customize the primary color in a LESS file.

const CracoLessPlugin = require('craco-less');

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: { '@primary-color': '#1DA57A' },
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
};

Babel Configuration Override

This feature allows you to override the default Babel configuration. In this example, the Babel plugin for decorators is added to the configuration.

module.exports = {
  babel: {
    plugins: [
      ['@babel/plugin-proposal-decorators', { legacy: true }],
    ],
  },
};

ESLint Configuration Override

This feature allows you to override the default ESLint configuration. In this example, the 'no-console' rule is turned off.

module.exports = {
  eslint: {
    enable: true,
    mode: 'extends',
    configure: {
      rules: {
        'no-console': 'off',
      },
    },
  },
};

Other packages similar to @craco/craco

Keywords

FAQs

Package last updated on 02 Oct 2022

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