Registry / web-framework / babel-plugin-zova-bean-module

babel-plugin-zova-bean-module

JSON →
library1.2.8jsnpmunverified

A Babel plugin for the Zova framework that enables module-based bean resolution and injection. Current stable version is 1.2.8. Released as part of the Zova project, follows Zova's release cadence. Key differentiator: transforms module-scoped bean decorators/annotations into runtime injectable code, essential for Zova's IoC container. Unlike generic DI plugins, it understands Zova's module system and generates proper module references.

npm install babel-plugin-zova-bean-module
INSTALL
IMPORT
SIG · BABEL-PLUGIN-ZOVA-
B
babel-plugin-zova-bean-module
web-frameworkjavascriptv1.2.8
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 (plugin)
module.exports = require('babel-plugin-zova-bean-module');
import plugin from 'babel-plugin-zova-bean-module';
Babel plugins are typically required via CommonJS. ESM import may not work directly.
Plugin in .babelrc
{"plugins": ["babel-plugin-zova-bean-module"]}
{"plugins": ["zova-bean-module"]}
Use full package name in Babel config to avoid confusion.
Plugin in babel.config.js
module.exports = { plugins: ['babel-plugin-zova-bean-module'] };
module.exports = { plugins: [require('babel-plugin-zova-bean-module')] };
String reference is preferred; calling require() may cause issues with caching.

Shows how to install and configure the Babel plugin in a typical Node.js project using CommonJS.

// Install: npm install --save-dev babel-plugin-zova-bean-module // Then in babel.config.js: module.exports = { presets: [ ['@babel/preset-env', { targets: { node: 'current' } }], ], plugins: ['babel-plugin-zova-bean-module'], };
Debug
Known issues
gotchaPlugin requires Zova framework context – transforms only work within Zova modules, not standalone.
fix
Ensure your source files are part of a Zova module (e.g., have @Module decorator or equivalent).
affects: >=1.0.0
breakingStarting from version 1.2.0, the plugin no longer supports legacy decorator syntax; ES decorator proposal syntax is required.
fix
Migrate from @Bean() decorator (legacy) to @bean() (ES proposal) syntax.
affects: >=1.2.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-plugin-zova-bean-module'
Plugin not installed or not in node_modules.
fix
Run npm install --save-dev babel-plugin-zova-bean-module and ensure it's listed in devDependencies.
SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): "decorators", "decorators-legacy"
Babel parser is not configured to handle decorator syntax.
fix
Add '@babel/plugin-proposal-decorators' to your Babel plugins array: plugins: [['@babel/plugin-proposal-decorators', { version: '2023-05' }], 'babel-plugin-zova-bean-module']
TypeError: (0 , _plugin.default) is not a function
Using ESM-style import of the plugin (e.g., import plugin from '...') which returns a module object, not the plugin function.
fix
Use CommonJS require: const plugin = require('babel-plugin-zova-bean-module'); or reference the string name in Babel config.
Upgrade
Version history
1.2.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
babel-plugin-zova-bean-module — npm install babel-plugin-zova-bean-module · libregistry