Registry / web-framework / meteor-babel

meteor-babel

JSON →
library7.10.7jsnpmunverified

A Babel wrapper package designed specifically for use with the Meteor framework, currently at v7.13.0. It provides a pre-configured Babel compilation pipeline that integrates seamlessly with Meteor's build system, supporting ES6/ES7 transpilation, TypeScript, and various syntax transformations. Differentiators include Meteor-specific plugins, automatic dependency management, and compatibility with Meteor's module system. Release cadence is irregular, with major version bumps tied to Meteor updates. vs. plain Babel: adds Meteor-specific transforms and optimizations, eases configuration for Meteor projects.

npm install meteor-babel
INSTALL
IMPORT
SIG · METEOR-BABEL
M
meteor-babel
web-frameworkjavascriptv7.10.7
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.

meteorBabel
import meteorBabel from 'meteor-babel'
const meteorBabel = require('meteor-babel')
Default import is the main entry; CommonJS require also works but ESM preferred.
compile
import { compile } from 'meteor-babel'
const compile = require('meteor-babel').compile
Named export for compile function; tree-shakeable with ESM.
setCacheDir
import { setCacheDir } from 'meteor-babel'
import setCacheDir from 'meteor-babel/setCacheDir'
setCacheDir is a named export, not a subpath export.

Shows how to import meteor-babel and use compile function and Babel class to transpile ES6 code.

import meteorBabel from 'meteor-babel'; import { compile } from 'meteor-babel'; const sourceCode = ` const x = (a, b) => a + b; export default x; `; // Compile with default options const result = compile(sourceCode, {}); console.log(result.code); // Or use the meteorBabel object for more control const babelInstance = new meteorBabel.Babel(); const transformed = babelInstance.transform(sourceCode, { filename: 'test.js', sourceMaps: true, }); console.log(transformed.code);
Debug
Known issues
breakingIn v7.11.0, default Babel plugins changed. Existing projects may break if relying on removed plugins.
fix
Update your .babelrc or Babel configuration to explicitly include any missing plugins.
affects: >=7.11.0 <7.13.0
deprecatedsetCacheDir() is deprecated as of v7.12.0; caching is now automatic.
fix
Remove calls to setCacheDir(); no action needed.
affects: >=7.12.0
gotchameteor-babel requires Node.js >= 10. Installing on older Node versions may fail silently.
fix
Upgrade Node.js to version 10 or higher.
affects: >=7.0.0
breakingIn v7.13.0, the 'loose' option for class transforms changed default behavior. See migration guide.
fix
Set 'loose' option explicitly in Babel config if relying on previous behavior.
affects: >=7.13.0
gotchaWhen using with Meteor, do not call compile() directly in production; use Meteor's build plugin.
fix
Use the meteor-babel package only as a dependency for Meteor's build system, not for direct invocation.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'meteor-babel'
Package not installed or misspelled.
fix
Run 'npm install meteor-babel' and ensure import path is correct.
TypeError: meteorBabel.compile is not a function
Importing default instead of named 'compile'.
fix
Use 'import { compile } from 'meteor-babel''.
SyntaxError: Unexpected token =>
Source code not transpiled; compile() not used or options missing.
fix
Ensure compile() is invoked on the source with correct options like { presets: ['meteor'] }.
Error: Could not find any Babel presets or plugins
Missing Babel configuration.
fix
Add a .babelrc file with presets/plugins or pass options to compile().
Upgrade
Version history
7.10.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
homepagenull
meteor-babel — npm install meteor-babel · libregistry