Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
jsy
✓ module.exports = { presets: ['jsy/lean'] }
✗ import { jsy } from 'babel-preset-jsy'
This is a Babel preset, not a JavaScript module. Use the preset name in Babel configuration as a string. 'jsy/lean' refers to a preset file inside the package.
babel-preset-jsy
✓ const presets = ['babel-preset-jsy']
✗ require('babel-preset-jsy')
In Babel 6, presets are specified as strings in .babelrc or babel config. Doing 'require' returns an object, but Babel expects a function.
jsy/lean
✓ const presets = ['jsy/lean']
The 'jsy/lean' preset is a variant that only transforms JSY syntax without additional polyfills or env targets.
Configures Babel with the jsy/lean preset and shows a sample JSY code snippet using indentation instead of braces.
// Install: npm install --save-dev babel-preset-jsy
// .babelrc configuration:
{
"presets": ["jsy/lean"]
}
// Example JSY code (file.jsy)
// Indentation-based syntax
const add = (a, b) =>
a + b
for (let i = 0; i < 10; i++)
console.log(i)
if (true)
console.log('true')
else
console.log('false')
// Compile with: babel file.jsy
Debug
Known issues
deprecatedThis package is designed for Babel 6.x and may not work with Babel 7+.fixFor Babel 7, consider using babel-plugin-jsy directly or look for updated presets.
affects: >=0.0.0
breakingVersion 0.10.0 changed the preset name from 'jsy' to 'jsy/lean'.fixUpdate your .babelrc: change "presets": ["jsy"] to "presets": ["jsy/lean"].
affects: >=0.10.0 <0.11.0
gotchaJSY syntax may conflict with standard JavaScript when used in mixed codebases.fixUse file extensions like .jsy or configure Babel to only transform JSY files if possible.
affects: >=0.0.0
gotchaCannot use both JSY and standard JavaScript in the same file without explicit transformation.fixUse babel-plugin-jsy with proper configuration to handle mixed syntax, or separate files.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Requires Babel "^6.0.0-0" but was loaded with "7.x.x".
Using babel-preset-jsy with Babel 7 or later.
fixUpgrade to a Babel 7 compatible preset or downgrade Babel to version 6.
Error: Cannot find module 'babel-preset-jsy/lean'
Incorrect path in preset configuration.
fixChange preset to 'babel-preset-jsy/lean' or 'jsy/lean' depending on your setup.
SyntaxError: Unexpected token (1:6) - using indentation
Babel not configured to use the JSY preset.
fixAdd 'jsy/lean' to presets in your Babel config.
Audit
Dependencies
babel-preset-envrequiredCore dependency for automatic target environment transpilation
babel-plugin-jsyrequiredPlugin that transforms JSY indentation-based syntax to standard JavaScript