parcel-plugin-jsy
raw JSON → 0.2.1 verified Fri May 01 auth: no javascript deprecated
A Parcel 1.x plugin that transpiles JSY syntax to standard JavaScript without requiring Babel. Current stable version 0.2.1. JSY is a superset of JavaScript with simplified syntax (e.g., trailing commas, optional semicolons, and concise arrow functions). This plugin integrates JSY directly into the Parcel bundling pipeline, replacing the traditional Babel toolchain for JSY projects. It is specific to Parcel 1.x (parcel-bundler peer dependency) and is not compatible with Parcel v2. Published under the MIT license, it has limited maintenance frequency.
Common errors
error Cannot find module 'parcel-plugin-jsy' ↓
cause Plugin is not installed or not in the correct location.
fix
Run npm install --save-dev parcel-plugin-jsy
error Error: Cannot find module 'parcel-bundler' ↓
cause Missing peer dependency parcel-bundler.
fix
Run npm install --save-dev parcel-bundler@^1.12.4
error Unhandled rejection Error: ENOENT: no such file or directory... ↓
cause Parcel version mismatch (using Parcel v2 instead of v1).
fix
Use parcel-bundler@^1.12.4 instead of parcel.
Warnings
deprecated parcel-plugin-jsy is only compatible with Parcel 1.x (parcel-bundler). It does not work with Parcel v2. ↓
fix If using Parcel v2, consider alternatives or use JSY with a different bundler.
breaking The plugin requires peer dependency parcel-bundler@^1.12.4. Installing with a different version will cause errors or unexpected behavior. ↓
fix Ensure you have parcel-bundler@^1.12.4 installed: npm install --save-dev parcel-bundler@^1.12.4
gotcha parcel-plugin-jsy auto-registers as a plugin; do not attempt to import or require it explicitly in your code. Doing so may cause runtime errors. ↓
fix Only add the package as a dependency; Parcel will discover it automatically.
Install
npm install parcel-plugin-jsy yarn add parcel-plugin-jsy pnpm add parcel-plugin-jsy Imports
- default (plugin registration) wrong
const parcelPluginJsy = require('parcel-plugin-jsy');correct// Package works via Parcel plugin resolution automatically - package.json wrong
"dependencies": { "parcel-plugin-jsy": "^0.2.1" }correct"devDependencies": { "parcel-plugin-jsy": "^0.2.1" } - Parcel bundler usage wrong
parcel-plugin-jsy build index.htmlcorrectparcel build index.html
Quickstart
// 1. Install dependencies
npm install --save-dev parcel-bundler@^1.12.4 parcel-plugin-jsy@^0.2.1
// 2. Create a JSY file (e.g., app.jsy)
// JSY example:
const add = (a, b) -> a + b
console.log add(1, 2)
// 3. Create an HTML file that references app.jsy
// <!DOCTYPE html>
// <html><body><script src="app.jsy"></script></body></html>
// 4. Build with Parcel
// npx parcel build index.html