babel-preset-mobx

Babel preset for all Mobx plugins.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-preset-mobx
2.0.04 years ago6 years agoMinified + gzip package size for babel-preset-mobx in KB

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"]
});