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