
babel-preset-cozy-app
A shareable configuration for Cozy Application with React and JSX support.
This package is a Babel preset used by create-cozy-app
.
Usage with a Create Cozy App projects
If you started your project using create-cozy-app
, you don't need to do anything, you should already have a .babelrc
configured to used this preset.
Usage with other projects
If you want to use this preset, you first need to have Babel installed (cf documentation).
Then, in a file named .babelrc
(the Babel configuration file), you can use the preset using the following way:
{
"presets": ["cozy-app"]
}
Content
Presets:
-
env
to add polyfills with the current configuration:
{
targets: {
chrome: 42,
ie: 10,
firefox: 40,
browsers: ['last 2 versions']
},
useBuiltIns: false
}
-
react
to support JSX and transform it to createElement
calls.
Plugins:
-
transform-object-rest-spread
to transform rest properties for object destructuring assignment and spread properties for object literals. The useBuiltIns
options is enable to directly use Object.assign
considered as available or polyilled.
-
transform-class-properties
to transform class attributes and methods with auto-binding to the class instance and no constructor needed.
-
transfor-runtime
only to polyfill generators (for async/await) here:
{
helpers: false,
polyfill: false,
regenerator: true
}
What's Cozy?

Cozy is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.
Get in touch
You can reach the Cozy Community by:
License
babel-preset-cozy-app
is distributed under the MIT license.