Registry / http-networking / rollup-plugin-jsy

rollup-plugin-jsy

JSON →
library1.9.4jsnpmunverified

A Rollup plugin that transforms JSY (a JavaScript syntax extension/sugar) into standard JavaScript using @jsy-lang/jsy. Version 1.9.4 is current, with stable API. This plugin enables using JSY syntax in Rollup builds, supporting both ESM and CommonJS outputs. Key differentiator: it leverages JSY's concise syntax while integrating seamlessly with Rollup's plugin system, including source maps and watch mode. Alternatives like Babel require separate configuration; this plugin is purpose-built for JSY.

npm install rollup-plugin-jsy
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-JSY
R
rollup-plugin-jsy
http-networkingjavascriptv1.9.4
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
import jsy from 'rollup-plugin-jsy'
const jsy = require('rollup-plugin-jsy')
ESM-only package, CommonJS require is not supported.
jsy
import { jsy } from 'rollup-plugin-jsy'
import Jsy from 'rollup-plugin-jsy'
The package exports a function as default; named export 'jsy' also available.
pluginOptions
import jsy, { PluginOptions } from 'rollup-plugin-jsy'
import type { PluginOptions } from 'rollup-plugin-jsy'
PluginOptions is a value export (not just type) for runtime use; TypeScript may treat it as type.

Minimal Rollup configuration using the JSY plugin to compile .jsy files.

// rollup.config.js import jsy from 'rollup-plugin-jsy'; export default { input: 'src/index.jsy', output: { file: 'dist/bundle.js', format: 'esm' }, plugins: [ jsy() // options: { include, exclude, sourceMap, etc. } ] };
Debug
Known issues
breakingPlugin output changed from object to string in version 1.0.0.
fix
Update to latest version (1.9.4) and ensure downstream code expects string output.
affects: <1.0.0
deprecatedOption 'sourceMap' renamed to 'sourcemap' in v1.2.0.
fix
Use 'sourcemap' instead of 'sourceMap' in plugin options.
affects: >=1.2.0
gotchaThe plugin only processes files with .jsy extension by default; other extensions need explicit 'include'.
fix
Use jsy({ include: ['**/*.jsy', '**/*.mjs'] }) to include additional patterns.
affects: >=1.0.0
breakingDropped support for Node.js 10 and 12 in v1.5.0.
fix
Upgrade to Node.js >=14.
affects: >=1.5.0
gotchaMust be placed before other syntax plugins (e.g., @rollup/plugin-babel) in Rollup plugins array.
fix
Order plugins as: [jsy(), babel()] to ensure JSY transforms first.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
Input file has .jsy extension but Rollup does not recognize it; plugin not added or misconfigured.
fix
Add jsy plugin to rollup.config.js and ensure 'include' covers the file.
TypeError: jsy is not a function
Importing the module incorrectly (e.g., using require or wrong named import).
fix
Use `import jsy from 'rollup-plugin-jsy'` (default import) or `const jsy = require('rollup-plugin-jsy').default`.
Error: Cannot find module '@jsy-lang/jsy'
Missing peer dependency @jsy-lang/jsy.
fix
Install peer dependency: npm install @jsy-lang/jsy --save-dev (or yarn add).
Upgrade
Version history
1.9.4latest on npm
Audit
Dependencies
@jsy-lang/jsyrequiredCore JSY transpiler; the plugin delegates all syntax transformation to this package.
Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
rollup-plugin-jsy — npm install rollup-plugin-jsy · libregistry