npm.io
0.19.2 • Published 5d ago

@best-shot/preset-react

Licence
MIT
Version
0.19.2
Deps
6
Size
6 kB
Vulns
0
Weekly
223

@best-shot/preset-react logo

A best-shot preset for react project.

npm github node

This preset offer the following features:

  • React framework and JSX syntax support.
  • Use react-refresh to support hot module reload.
  • Remove react/airbnb propTypes in production mode.
  • JSX syntax in typescript: *.tsx

Installation

npm install @best-shot/preset-react --save-dev

Usage

// example: .best-shot/config.mjs
export const config = {
  presets: ['babel', 'react']
};

Tips

This preset contains some optimization transform. It is not 100% safe, you can enable them manually.

// example: babel.config.json
{
  "plugins": ["@babel/transform-react-constant-elements"]
}

Keywords