{"id":19313,"library":"babel-preset-mobx","title":"babel-preset-mobx","description":"Babel preset for ES features commonly used with MobX. Current stable version 2.0.0, last updated 2017, no recent releases. Includes transform-decorators-legacy, transform-class-properties, transform-es2015-classes, transform-regenerator. Requires babel-polyfill or regenerator-runtime for async/generators. Outdated and unmaintained; users should migrate to modern Babel (v7+) with individual @babel/plugin proposals or a custom preset. Does not support current MobX 6+ decorator syntax.","status":"deprecated","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/zwhitchcox/babel-preset-mobx","tags":["javascript"],"install":[{"cmd":"npm install babel-preset-mobx","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-mobx","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-mobx","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required for async/generator functions at runtime","package":"babel-polyfill","optional":true},{"reason":"alternative to babel-polyfill for async/generators","package":"regenerator-runtime","optional":true}],"imports":[{"note":"Preset is configured in Babel config, not imported in code.","wrong":"import 'babel-preset-mobx' // not meant for direct import","symbol":"preset","correct":"// .babelrc: { \"presets\": [\"mobx\"] }"},{"note":"Plugins are bundled, not individually exported.","wrong":"import { transformDecoratorsLegacy } from 'babel-preset-mobx'","symbol":"decorator support","correct":"// Use babel-preset-mobx in .babelrc"},{"note":"babel-preset-mobx includes transform-regenerator but not the runtime.","wrong":"// assumed included in preset, but it's not","symbol":"regenerator","correct":"// need to add regenerator-runtime as dependency"}],"quickstart":{"code":"npm install --save-dev babel-preset-mobx\n# Add to .babelrc:\n{\n  \"presets\": [\"mobx\"]\n}","lang":"javascript","description":"Install and configure babel-preset-mobx with .babelrc for MobX projects."},"warnings":[{"fix":"Use @babel/preset-env and add required plugins manually for Babel 7+.","message":"babel-preset-mobx is outdated and unmaintained; not compatible with Babel 7+.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Install babel-polyfill or regenerator-runtime as a runtime dependency.","message":"babel-polyfill or regenerator-runtime must be installed separately for async/generators.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use @babel/plugin-proposal-decorators and @babel/plugin-proposal-class-properties.","message":"Included plugins (transform-decorators-legacy) are deprecated in Babel 7+.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Upgrade to a Babel 7 compatible preset or use @babel/preset-env with manual plugins.","cause":"Using this preset with Babel 7+ which expects functions, not legacy plugin objects.","error":"Error: Plugin/Preset files are not allowed to export objects, only functions."},{"fix":"Install regenerator-runtime and import it at the entry point.","cause":"Missing regenerator-runtime runtime dependency for async functions.","error":"ReferenceError: regeneratorRuntime is not defined"},{"fix":"Add @babel/plugin-proposal-decorators with legacy: true to Babel config.","cause":"Babel 7 requires explicit plugin for decorators.","error":"Support for the experimental syntax 'decorators-legacy' isn't currently enabled"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}