{"id":26332,"library":"rollup-plugin-jsy","title":"rollup-plugin-jsy","description":"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.","status":"active","version":"1.9.4","language":"javascript","source_language":"en","source_url":"https://github.com/jsy-lang/rollup-plugin-jsy","tags":["javascript","rollup","rollup-plugin","JSY"],"install":[{"cmd":"npm install rollup-plugin-jsy","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-jsy","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-jsy","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core JSY transpiler; the plugin delegates all syntax transformation to this package.","package":"@jsy-lang/jsy","optional":false}],"imports":[{"note":"ESM-only package, CommonJS require is not supported.","wrong":"const jsy = require('rollup-plugin-jsy')","symbol":"default","correct":"import jsy from 'rollup-plugin-jsy'"},{"note":"The package exports a function as default; named export 'jsy' also available.","wrong":"import Jsy from 'rollup-plugin-jsy'","symbol":"jsy","correct":"import { jsy } from 'rollup-plugin-jsy'"},{"note":"PluginOptions is a value export (not just type) for runtime use; TypeScript may treat it as type.","wrong":"import type { PluginOptions } from 'rollup-plugin-jsy'","symbol":"pluginOptions","correct":"import jsy, { PluginOptions } from 'rollup-plugin-jsy'"}],"quickstart":{"code":"// rollup.config.js\nimport jsy from 'rollup-plugin-jsy';\n\nexport default {\n  input: 'src/index.jsy',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'esm'\n  },\n  plugins: [\n    jsy() // options: { include, exclude, sourceMap, etc. }\n  ]\n};","lang":"javascript","description":"Minimal Rollup configuration using the JSY plugin to compile .jsy files."},"warnings":[{"fix":"Update to latest version (1.9.4) and ensure downstream code expects string output.","message":"Plugin output changed from object to string in version 1.0.0.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Use 'sourcemap' instead of 'sourceMap' in plugin options.","message":"Option 'sourceMap' renamed to 'sourcemap' in v1.2.0.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Use jsy({ include: ['**/*.jsy', '**/*.mjs'] }) to include additional patterns.","message":"The plugin only processes files with .jsy extension by default; other extensions need explicit 'include'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to Node.js >=14.","message":"Dropped support for Node.js 10 and 12 in v1.5.0.","severity":"breaking","affected_versions":">=1.5.0"},{"fix":"Order plugins as: [jsy(), babel()] to ensure JSY transforms first.","message":"Must be placed before other syntax plugins (e.g., @rollup/plugin-babel) in Rollup plugins array.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add jsy plugin to rollup.config.js and ensure 'include' covers the file.","cause":"Input file has .jsy extension but Rollup does not recognize it; plugin not added or misconfigured.","error":"Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)"},{"fix":"Use `import jsy from 'rollup-plugin-jsy'` (default import) or `const jsy = require('rollup-plugin-jsy').default`.","cause":"Importing the module incorrectly (e.g., using require or wrong named import).","error":"TypeError: jsy is not a function"},{"fix":"Install peer dependency: npm install @jsy-lang/jsy --save-dev (or yarn add).","cause":"Missing peer dependency @jsy-lang/jsy.","error":"Error: Cannot find module '@jsy-lang/jsy'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}