Registry / devops / babel-preset-meteor

babel-preset-meteor

JSON →
library8.0.3jsnpmunverified

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.

npm install babel-preset-meteor
INSTALL
IMPORT
SIG · BABEL-PRESET-METEO
B
babel-preset-meteor
devopsjavascriptv8.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default preset
{ "presets": ["meteor"] }
{ "presets": ["babel-preset-meteor"] }
When using .babelrc, omit the 'babel-preset-' prefix; Babel resolves it automatically.
Node API
const babel = require('@babel/core'); babel.transform(code, { presets: ['meteor'] });
const babel = require('babel-core'); babel.transform(code, { presets: ['meteor'] });
babel-core is deprecated; use @babel/core since babel-preset-meteor 8.x works with Babel 7.
CLI usage
babel script.js --presets meteor
babel script.js --presets babel-preset-meteor
CLI resolves preset names similarly; do not include the full scoped package name.

Demonstrates installation and basic configuration of babel-preset-meteor via .babelrc and CLI.

// Install: npm install --save-dev babel-preset-meteor // Create .babelrc in project root, or in a package directory { "presets": ["meteor"] } // Then run Babel on your files: // babel src/ --out-dir lib --presets meteor
Debug
Known issues
breakingbabel-preset-meteor 8.x requires Babel 7 (i.e., @babel/core). It is incompatible with older babel-core 6.x.
fix
Upgrade to @babel/core (Babel 7) and use babel-preset-meteor@8 or later.
affects: >=8.0.0
deprecatedThis preset is in maintenance mode. Meteor's official recommendation for new projects is to use @babel/preset-env with appropriate targets.
fix
For new projects, consider using @babel/preset-env directly and configure targets based on Meteor's Meteor.userConfig().
affects: >=8.0.0
gotchaThe preset automatically includes @babel/plugin-transform-runtime. Ensure @babel/runtime is installed as a dependency.
fix
Add @babel/runtime to your dependencies or devDependencies if not already present.
affects: >=8.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-meteor'
The preset is not installed or Babel cannot resolve it.
fix
Run 'npm install --save-dev babel-preset-meteor' from the project root.
Error: Requires Babel "^7.0.0-0", but was loaded with "6.x.x"
Mismatched Babel versions: preset expects Babel 7 but old babel-core 6 is installed.
fix
Install @babel/core (Babel 7) and uninstall babel-core if present.
ReferenceError: regeneratorRuntime is not defined
Missing @babel/runtime package which provides the async generator helper.
fix
Install @babel/runtime: 'npm install @babel/runtime'.
Upgrade
Version history
8.0.3latest on npm
Audit
Dependencies
@babel/runtimerequiredProvides helper functions for transpiled code that Meteor expects to be available at runtime.
Agent activity
6 hits · last 30 days
node
6
Resources
babel-preset-meteor — npm install babel-preset-meteor · libregistry