{"id":19249,"library":"babel-plugin-zova-bean-module","title":"babel-plugin-zova-bean-module","description":"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.","status":"active","version":"1.2.8","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","framework","zova"],"install":[{"cmd":"npm install babel-plugin-zova-bean-module","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-zova-bean-module","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-zova-bean-module","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Babel plugins are typically required via CommonJS. ESM import may not work directly.","wrong":"import plugin from 'babel-plugin-zova-bean-module';","symbol":"default (plugin)","correct":"module.exports = require('babel-plugin-zova-bean-module');"},{"note":"Use full package name in Babel config to avoid confusion.","wrong":"{\"plugins\": [\"zova-bean-module\"]}","symbol":"Plugin in .babelrc","correct":"{\"plugins\": [\"babel-plugin-zova-bean-module\"]}"},{"note":"String reference is preferred; calling require() may cause issues with caching.","wrong":"module.exports = { plugins: [require('babel-plugin-zova-bean-module')] };","symbol":"Plugin in babel.config.js","correct":"module.exports = { plugins: ['babel-plugin-zova-bean-module'] };"}],"quickstart":{"code":"// Install: npm install --save-dev babel-plugin-zova-bean-module\n// Then in babel.config.js:\nmodule.exports = {\n  presets: [\n    ['@babel/preset-env', { targets: { node: 'current' } }],\n  ],\n  plugins: ['babel-plugin-zova-bean-module'],\n};","lang":"javascript","description":"Shows how to install and configure the Babel plugin in a typical Node.js project using CommonJS."},"warnings":[{"fix":"Ensure your source files are part of a Zova module (e.g., have @Module decorator or equivalent).","message":"Plugin requires Zova framework context – transforms only work within Zova modules, not standalone.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate from @Bean() decorator (legacy) to @bean() (ES proposal) syntax.","message":"Starting from version 1.2.0, the plugin no longer supports legacy decorator syntax; ES decorator proposal syntax is required.","severity":"breaking","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev babel-plugin-zova-bean-module and ensure it's listed in devDependencies.","cause":"Plugin not installed or not in node_modules.","error":"Error: Cannot find module 'babel-plugin-zova-bean-module'"},{"fix":"Add '@babel/plugin-proposal-decorators' to your Babel plugins array: plugins: [['@babel/plugin-proposal-decorators', { version: '2023-05' }], 'babel-plugin-zova-bean-module']","cause":"Babel parser is not configured to handle decorator syntax.","error":"SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): \"decorators\", \"decorators-legacy\""},{"fix":"Use CommonJS require: const plugin = require('babel-plugin-zova-bean-module'); or reference the string name in Babel config.","cause":"Using ESM-style import of the plugin (e.g., import plugin from '...') which returns a module object, not the plugin function.","error":"TypeError: (0 , _plugin.default) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}