Registry / devops / constellate-plugin-compiler-babel

constellate-plugin-compiler-babel

JSON →
library0.14.0jsnpmunverified

A Babel compiler plugin for Constellate projects, Version 0.14.0. This plugin integrates Babel into the Constellate build pipeline, allowing transformation of JavaScript/TypeScript code. It is part of the Constellate monorepo and is released on npm. Use it to transpile modern JS to older syntax as part of a Constellate build. Alternatives include other compiler plugins like TypeScript or Terser. Note: This is a plugin meant to be used with the Constellate CLI, not standalone.

npm install constellate-plugin-compiler-babel
INSTALL
IMPORT
SIG · CONSTELLATE-PLUGIN
C
constellate-plugin-compiler-babel
devopsjavascriptv0.14.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

babel
✓ import babel from 'constellate-plugin-compiler-babel'
✗ const babel = require('constellate-plugin-compiler-babel')
ESM-only package, named export also available.
babel
✓ import { babel } from 'constellate-plugin-compiler-babel'
✗ const { babel } = require('constellate-plugin-compiler-babel')
Named export is the same as default.
compile
✓ import { compile } from 'constellate-plugin-compiler-babel'
Alternative named export for direct compilation.

Demonstrates importing the Babel plugin and using it with Constellate to compile a JavaScript file with @babel/preset-env.

import babel from 'constellate-plugin-compiler-babel'; import constellate from 'constellate'; const config = { plugins: [babel({ presets: ['@babel/preset-env'] })] }; const result = await constellate.compile('src/index.js', config); console.log(result.code);
Debug
Known issues
gotchaThis plugin is meant to be used as part of Constellate, not as a standalone Babel wrapper. It does not expose a direct Babel API.
fix
Use the plugin with Constellate's compile function.
affects: >=0.1.0
deprecatedThe package uses an older naming convention and might be renamed in future Constellate versions.
fix
Follow Constellate releases for migration.
affects: 0.14.0
gotchaEnsure @babel/core is installed in your project, as it's a peer dependency.
fix
Run npm install @babel/core.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module '@babel/core'
@babel/core is not installed.
fix
npm install @babel/core
TypeError: babel is not a function
Importing incorrectly (e.g., default vs named).
fix
Use import babel from 'constellate-plugin-compiler-babel'.
Plugin configuration error: Babel presets not applied
Presets not passed correctly to babel() call.
fix
Pass presets as array, e.g., babel({ presets: ['@babel/preset-env'] })
Upgrade
Version history
0.14.0latest on npm
Audit
Dependencies
@babel/corerequiredBabel core is required for compilation
constellateoptionalPrimary Constellate package, peer dependency
Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources
constellate-plugin-compiler-babel — npm install constellate-plugin-compiler-babel · libregistry