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

babel-plugin-zova-bean-use

JSON →
library1.1.8jsnpmunverified

A Babel plugin (v1.1.8) specific to the Zova framework that transforms bean usage in JavaScript/TypeScript projects. It enables the '@beanUse' decorator pattern to inject dependencies or services. This plugin targets a niche Zova ecosystem and has low release cadence. It is not suitable outside Zova. Other IOC or DI Babel plugins like babel-plugin-transform-decorators may serve broader needs.

npm install babel-plugin-zova-bean-use
INSTALL
IMPORT
SIG · BABEL-PLUGIN-ZOVA-
B
babel-plugin-zova-bean-use
web-frameworkjavascriptv1.1.8
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.

default
module.exports = require('babel-plugin-zova-bean-use');
import plugin from 'babel-plugin-zova-bean-use';
This package does not export an ES module. Use require() in .babelrc or programmatic config.
babel-plugin-zova-bean-use
plugins: ['babel-plugin-zova-bean-use']
plugins: ['bean-use']
Full plugin name required in babel config.
babel-plugin-zova-bean-use with config
plugins: [['babel-plugin-zova-bean-use', { option: true }]]
plugins: ['babel-plugin-zova-bean-use', { option: true }]
Options must be in nested array syntax.

Shows how to add the plugin to Babel config for transforming the @beanUse decorator in classes.

module.exports = { presets: [ ['@babel/preset-env', { targets: { node: 'current' } }], ], plugins: ['babel-plugin-zova-bean-use'] }; // Then in your code: class MyClass { @beanUse MyService; // ... }
Debug
Known issues
gotchaPlugin only works within Zova framework context; using it elsewhere may break builds.
fix
Ensure your project is a Zova application.
affects: all
breakingRequires Babylon 7+ (Babel 7). Not compatible with Babel 6.
fix
Upgrade to Babel 7+.
affects: >=1.0.0
deprecatedPlugin is specific to an early version of Zova; may not be maintained.
fix
Contact Zova maintainers for current approach.
affects: >=1.0.0
Errors
Common errors & fixes
ReferenceError: exports is not defined
Using ES module import syntax with this plugin which expects CommonJS.
fix
Use `require('babel-plugin-zova-bean-use')` instead of `import`.
Error: Cannot find module 'babel-plugin-zova-bean-use'
Plugin not installed, or incorrect package name in config.
fix
Run `npm install --save-dev babel-plugin-zova-bean-use` and use full name in plugins.
SyntaxError: Support for the experimental syntax '@' isn't currently enabled
Decorators not enabled in Babel config.
fix
Add '@babel/plugin-proposal-decorators' before this plugin.
Upgrade
Version history
1.1.8latest on npm
Audit
Dependencies
@babel/corerequiredPeer dependency for Babel plugin interface
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
babel-plugin-zova-bean-use — npm install babel-plugin-zova-bean-use · libregistry