rollup-plugin-jsy-lite

raw JSON →
1.7.3 verified Mon Apr 27 auth: no javascript

A Rollup plugin that transpiles JSY syntax to standard JavaScript without requiring Babel. Current stable version is 1.7.3, with a maintenance release cadence. It is part of the JSY language ecosystem, providing a lightweight alternative to Babel-based JSY transpilation by using the `@jsy-lang/jsy-lite` parser directly. Key differentiators: no Babel dependency, simple configuration, and support for multiple output formats (CJS, UMD, ESM). Suitable for projects that want to use JSY syntax with Rollup but avoid the complexity of Babel.

error Error: Cannot find module 'rollup-plugin-jsy-lite'
cause Package not installed or not in node_modules.
fix
Run npm install -D rollup-plugin-jsy-lite.
error SyntaxError: Unexpected token
cause JSY file has syntax that is not valid JavaScript and plugin not applied.
fix
Ensure rollup-plugin-jsy-lite is added to the plugins array and file extension is .jsy.
error Error: You must specify 'output.format'
cause Rollup configuration missing output format.
fix
Add a format property (e.g., 'cjs', 'es', 'umd') to output options.
deprecated rollup-plugin-node-resolve is deprecated; use @rollup/plugin-node-resolve instead.
fix Replace rollup-plugin-node-resolve with @rollup/plugin-node-resolve in devDependencies and import.
gotcha JSY files must have .jsy extension; otherwise plugin won't process them.
fix Ensure input files use .jsy extension.
gotcha Plugin must be included in Rollup plugins array; no default processing.
fix Add `rpi_jsy()` to the plugins array in rollup.config.js.
npm install rollup-plugin-jsy-lite
yarn add rollup-plugin-jsy-lite
pnpm add rollup-plugin-jsy-lite

Example Rollup configuration using rollup-plugin-jsy-lite to transpile JSY syntax with node-resolve plugin.

import rpi_jsy from 'rollup-plugin-jsy-lite';
import resolve from '@rollup/plugin-node-resolve';

export default {
  input: 'src/index.jsy',
  output: {
    file: 'dist/index.js',
    format: 'cjs'
  },
  plugins: [
    resolve(),
    rpi_jsy()
  ]
};