A babel preset for Zapier. Heavily inspired by babel-preset-airbnb.
yarn add --dev @zapier/babel-preset-zapier
Create your .babelrc file in the root of your project:
{
"presets": ["@zapier/babel-preset-zapier"]
}
- Uses
babel-preset-env - Defaults to a sane list of browser versions (based on https://github.com/zapier/browserslist-config-zapier).
- ES modules by default.
- Handles extra configuration for testing with Jest for you.
- Supports dynamic
import()statements, object rest-spread and class properties. - Removes PropTypes definitions in production.
- Compiles GraphQL tagged template strings in production.
- Configures
emotionto add filepaths to classNames by default.
Note that babel-preset-zapier currently does not support babel versions lower than v7.
- Use semantic versioning for deciding how to bump versions.
npm publishto publish the new version to NPM.