{"id":19311,"library":"babel-preset-meteor","title":"babel-preset-meteor","description":"Babel preset for Meteor's build system, enabling ES2015+ syntax and features supported by Meteor's runtime. Current stable version is 8.0.3. This preset is specifically designed for Meteor plugins and applications, providing transforms and polyfills that align with Meteor's version of Node.js and browser targets. Unlike generic presets like @babel/preset-env, babel-preset-meteor includes Meteor-specific transforms (e.g., object-assign, regenerator, dynamic import) and avoids unnecessary transformations already handled by Meteor's compilation pipeline. Release cadence is tied to Meteor releases; note that this package has been in maintenance mode since Meteor 2.0, with newer projects typically using Meteor's built-in Babel configuration or @babel/preset-env directly.","status":"maintenance","version":"8.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/meteor/babel-preset-meteor","tags":["javascript"],"install":[{"cmd":"npm install babel-preset-meteor","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-meteor","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-meteor","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides helper functions for transpiled code that Meteor expects to be available at runtime.","package":"@babel/runtime","optional":false}],"imports":[{"note":"When using .babelrc, omit the 'babel-preset-' prefix; Babel resolves it automatically.","wrong":"{\n  \"presets\": [\"babel-preset-meteor\"]\n}","symbol":"default preset","correct":"{\n  \"presets\": [\"meteor\"]\n}"},{"note":"babel-core is deprecated; use @babel/core since babel-preset-meteor 8.x works with Babel 7.","wrong":"const babel = require('babel-core');\nbabel.transform(code, { presets: ['meteor'] });","symbol":"Node API","correct":"const babel = require('@babel/core');\nbabel.transform(code, { presets: ['meteor'] });"},{"note":"CLI resolves preset names similarly; do not include the full scoped package name.","wrong":"babel script.js --presets babel-preset-meteor","symbol":"CLI usage","correct":"babel script.js --presets meteor"}],"quickstart":{"code":"// Install: npm install --save-dev babel-preset-meteor\n// Create .babelrc in project root, or in a package directory\n{\n  \"presets\": [\"meteor\"]\n}\n// Then run Babel on your files:\n// babel src/ --out-dir lib --presets meteor","lang":"javascript","description":"Demonstrates installation and basic configuration of babel-preset-meteor via .babelrc and CLI."},"warnings":[{"fix":"Upgrade to @babel/core (Babel 7) and use babel-preset-meteor@8 or later.","message":"babel-preset-meteor 8.x requires Babel 7 (i.e., @babel/core). It is incompatible with older babel-core 6.x.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"For new projects, consider using @babel/preset-env directly and configure targets based on Meteor's Meteor.userConfig().","message":"This preset is in maintenance mode. Meteor's official recommendation for new projects is to use @babel/preset-env with appropriate targets.","severity":"deprecated","affected_versions":">=8.0.0"},{"fix":"Add @babel/runtime to your dependencies or devDependencies if not already present.","message":"The preset automatically includes @babel/plugin-transform-runtime. Ensure @babel/runtime is installed as a dependency.","severity":"gotcha","affected_versions":">=8.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev babel-preset-meteor' from the project root.","cause":"The preset is not installed or Babel cannot resolve it.","error":"Error: Cannot find module 'babel-preset-meteor'"},{"fix":"Install @babel/core (Babel 7) and uninstall babel-core if present.","cause":"Mismatched Babel versions: preset expects Babel 7 but old babel-core 6 is installed.","error":"Error: Requires Babel \"^7.0.0-0\", but was loaded with \"6.x.x\""},{"fix":"Install @babel/runtime: 'npm install @babel/runtime'.","cause":"Missing @babel/runtime package which provides the async generator helper.","error":"ReferenceError: regeneratorRuntime is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}