Registry / web-framework / babel-plugin-riza

babel-plugin-riza

JSON →
library2.1.2jsnpmunverified

A Babel plugin for transpiling JSX syntax in Riza applications. Version 2.1.2 is the current stable release. It provides JSX compilation specifically tailored for the Riza framework, with support for server components and client components. Key differentiators include optimized output for Riza's virtual DOM and built-in support for automatic runtime detection.

npm install babel-plugin-riza
INSTALL
IMPORT
SIG · BABEL-PLUGIN-RIZA
B
babel-plugin-riza
web-frameworkjavascriptv2.1.2
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
const rizaPlugin = require('babel-plugin-riza')
import rizaPlugin from 'babel-plugin-riza'
CommonJS is the default; ESM import requires a bundler that supports ESM. In Babel config, use string 'babel-plugin-riza'.
rizaPlugin
const rizaPlugin = require('babel-plugin-riza').default || require('babel-plugin-riza')
const { rizaPlugin } = require('babel-plugin-riza')
The plugin exports a function directly; named export 'rizaPlugin' does not exist.
type PluginOptions
import type { PluginOptions } from 'babel-plugin-riza'
const { PluginOptions } = require('babel-plugin-riza')
PluginOptions is a TypeScript type, not a runtime export. Use import type.

Shows how to configure the plugin in .babelrc and use it programmatically with Babel.

// .babelrc { "plugins": [ [ "babel-plugin-riza", { "target": "server", "throwIfNamespace": false } ] ] } // or programmatically const babel = require('@babel/core'); babel.transformSync(code, { plugins: [ ['babel-plugin-riza', { target: 'client' }] ] });
Debug
Known issues
breakingPlugin options have changed between versions 1.x and 2.x. The 'runtime' option was renamed to 'target'.
fix
Use 'target' instead of 'runtime' in plugin options.
affects: >=2.0.0
breakingVersion 2.x no longer supports the 'classic' runtime. Only 'automatic' runtime is supported.
fix
Remove runtime option or set to 'automatic'. Use React 17+ style JSX transform.
affects: >=2.0.0
deprecatedThe option 'throwIfNamespace' is deprecated and will be removed in version 3.x.
fix
Set namespace validation via Babel's @babel/plugin-transform-react-jsx instead.
affects: >=2.1.0
gotchaPlugin must be listed before other JSX plugins to work correctly.
fix
Ensure 'babel-plugin-riza' is the first in the plugins array.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Requires Babel 7 or higher
Plugin is incompatible with Babel 6 or lower.
fix
Upgrade to Babel 7 or later.
Error: Cannot find module 'babel-plugin-riza'
Package not installed or not in node_modules.
fix
Run npm install babel-plugin-riza@latest
TypeError: rizaPlugin is not a function
Incorrect import style; plugin is CommonJS with default export.
fix
Use require('babel-plugin-riza') or module.exports = require('babel-plugin-riza') in config.
Upgrade
Version history
2.1.2latest on npm
Audit
Dependencies
@babel/corerequiredRequires Babel core to function as a plugin
@babel/plugin-syntax-jsxrequiredRequired to parse JSX syntax
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
babel-plugin-riza — npm install babel-plugin-riza · libregistry