babel-preset-mobx
v2.0.0
Published
Babel preset for all Mobx plugins.
Downloads
9,661
Readme
babel-preset-mobx
Babel preset for ES features commonly used with mobx
This preset includes the following plugins:
transform-decorators-legacy
transform-class-properties
transform-es2015-classes
transform-regenerator
In order to use async/generator functions, you will need to add
babel-polyfill
or
regenerator-runtime
to your dependencies
(note: that's not devDependencies
, as it's needed at
runtime).
Install
$ npm install --save-dev babel-preset-mobx
Usage
Via .babelrc
(Recommended)
.babelrc
{
"presets": ["mobx"]
}
Via CLI
$ babel script.js --presets mobx
Via Node API
require("babel-core").transform("code", {
presets: ["mobx"]
});