@best-shot/preset-react
v0.15.1
Published
A `best-shot` preset for react project
Downloads
680
Maintainers
Readme
@best-shot/preset-react
A best-shot
preset for react project.
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"]
}