{"id":25042,"library":"buble","title":"Bublé","description":"Bublé is a fast ES2015+ to ES5 compiler that requires zero configuration. Version 0.20.0 is current but in maintenance mode. It was designed before modern browsers supported ES2015, and now only recommended for IE11 compatibility. Unlike Babel, Bublé does not require plugins or presets, making it simpler but less extensible. It supports ES2015 features like arrow functions, template literals, destructuring, and let/const, plus some ES2016/ES2017 features (exponentiation, async/await). No new features will be added; only bugfixes.","status":"maintenance","version":"0.20.0","language":"javascript","source_language":"en","source_url":"https://github.com/bublejs/buble","tags":["javascript","transpilation","compilation","esnext","es2015","es2017","es6","es7"],"install":[{"cmd":"npm install buble","lang":"bash","label":"npm"},{"cmd":"yarn add buble","lang":"bash","label":"yarn"},{"cmd":"pnpm add buble","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"used for JavaScript parsing","package":"acorn","optional":false},{"reason":"supports JSX syntax if needed","package":"acorn-jsx","optional":true},{"reason":"for source map generation","package":"magic-string","optional":false}],"imports":[{"note":"Bublé does not ship ES module; use CommonJS require() for Node compatibility.","wrong":"import buble from 'buble';","symbol":"default (transform)","correct":"const buble = require('buble'); buble.transform(source);"},{"note":"Named import from CJS is fine, but ESM import fails due to missing .mjs entry.","wrong":"import { transform } from 'buble';","symbol":"transform","correct":"const { transform } = require('buble');"},{"note":"CLI tool is separate from npm package; install globally with -g.","wrong":"import buble from 'buble';","symbol":"buble (CLI)","correct":"const exec = require('child_process').execSync('buble input.js');"}],"quickstart":{"code":"const buble = require('buble');\nconst result = buble.transform('const x = () => 1;', {\n  transforms: { modules: false },\n  source: 'input.js'\n});\nconsole.log(result.code); // 'var x = function () { return 1; };'","lang":"javascript","description":"Shows basic usage of Bublé's transform function: compile arrow function to ES5, disable module transformation."},"warnings":[{"fix":"Consider Babel or SWC for modern needs unless IE11 support is required.","message":"Bublé is in maintenance mode; no new features will be added.","severity":"deprecated","affected_versions":">=0.20.0"},{"fix":"Update userland plugins to be compatible with acorn 5+.","message":"In v0.17+, the 'acorn' dependency changed; custom acorn plugins may break.","severity":"breaking","affected_versions":">=0.17.0"},{"fix":"Use Babel or TypeScript for those features.","message":"Bublé does not support dynamic import() or optional chaining.","severity":"gotcha","affected_versions":">=0.20.0"},{"fix":"npm install magic-string@^0.25.0 as a dependency.","message":"Source maps require magic-string; ensure it is installed.","severity":"gotcha","affected_versions":">=0.20.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install buble` which includes acorn as a dependency.","cause":"Missing acorn dependency (Bublé uses it internally).","error":"Error: Cannot find module 'acorn'"},{"fix":"Use `const buble = require('buble');` instead of `import buble from 'buble';`.","cause":"Invalid import: trying to use ES import syntax on CJS module.","error":"TypeError: buble.transform is not a function"},{"fix":"Add option `transforms: { modules: false }` or use Babel for ES modules.","cause":"Bublé does not support transforming import/export statements by default.","error":"SyntaxError: Unexpected token (1:6): import statement"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}