babel-preset-mercenary
This package includes the Babel preset used by mercenary.
Please refer to its documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with mercenary.
Usage in Mercenary projects
The easiest way to use this configuration is with mercenary, which includes it by default. You don’t need to install it separately in mercenary projects.
Usage Outside of Mercenary
If you want to use this Babel preset in a project not built with mercenary, you can install it with following steps.
First, install Babel.
Then create a file named .babelrc
with following contents in the root folder of your project:
"presets": "mercenary"
This preset uses the useBuiltIns
option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign
is available or polyfilled.