Yoshi provides its own preset for full-stack, client or Node.js projects. It is pre-configured, maintained and tuned for the current state of Yoshi.
Configure yoshi
to use its built-in preset by adding the following to your package.json
:
{
"babel": {
"presets": ["yoshi"]
}
}
- preset-env for ESNext to ES5 transform. Moreover, you can customize current targets and module type to build for. Will use all targets and commonjs module type as a default values.
- preset-react for JSX and Flow transforms.
- Stage 2 and 3 plugins: transform-class-properties, transform-decorators (legacy).
- remove-prop-types only for production builds.
- syntax-dynamic-import - just syntax support since all transforms by webpack.
targets
: Avoid redundant transformations if specified targets already support some of ESNext features. See more preset-env#targets. By default, if notargets
provided, it will compile for all targets.modules
(default:"commonjs"
): Enable transformation of ES6 module syntax to another module type. See preset-env#modules. Setfalse
to ignore module transforms.ignoreReact
(default:false
): ignores plugins and presets related to React.debug
(default:false
): Outputs the targets/plugins used according to specified targets. See preset-env#debug.