{"id":19352,"library":"babel-preset-yoshi","title":"babel-preset-yoshi","description":"A Babel 7 preset (v4.78.0) for Yoshi, Wix's build toolchain. It includes transforms for modern JavaScript, React (with JSX), TypeScript, and other Babel plugins commonly needed in Wix projects. Release cadence follows yoshi's lifecycle. Key differentiators: opinionated defaults for Wix's monorepo and application conventions, integration with yoshi's module resolution, and minimal configuration overhead compared to manually assembling Babel presets. Supports JavaScript and TypeScript with automatic polyfilling for target environments.","status":"active","version":"4.78.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","babel","preset","yoshi"],"install":[{"cmd":"npm install babel-preset-yoshi","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-yoshi","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-yoshi","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for Babel transformations","package":"@babel/core","optional":false}],"imports":[{"note":"Use string name in Babel config; no explicit import needed in JS code.","wrong":"Error: Cannot find module 'babel-preset-yoshi' if not installed","symbol":"babel-preset-yoshi","correct":"const presets = ['babel-preset-yoshi'];\n// or .babelrc: { \"presets\": [\"babel-preset-yoshi\"] }"}],"quickstart":{"code":"// Install: npm install --save-dev babel-preset-yoshi @babel/core\n// .babelrc\n{\n  \"presets\": [\n    [\"babel-preset-yoshi\", {\n      \"targets\": {\n        \"browsers\": [\"last 2 versions\"]\n      },\n      \"typescript\": false,\n      \"react\": true\n    }]\n  ]\n}","lang":"javascript","description":"Shows how to configure babel-preset-yoshi in a Babel config file with options for target browsers, TypeScript, and React support."},"warnings":[{"fix":"Upgrade Node.js to version 12 or higher.","message":"Dropped support for Node.js < 12 in v4.0.0","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Replace { modules: false } with { useESModules: true } in preset options.","message":"The 'modules' option is deprecated, use 'useESModules' instead.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Set { typescript: true } in preset options if using TypeScript.","message":"When using with TypeScript, ensure 'typescript: true' is set, else .ts files will not be transformed.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Remove explicit @babel/polyfill import if preset handles polyfilling via useBuiltIns.","message":"Auto polyfill via @babel/preset-env may conflict if you also install @babel/polyfill manually.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install babel-preset-yoshi --save-dev","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'babel-preset-yoshi'"},{"fix":"Set react: false in babel-preset-yoshi options if using another React preset, or remove the other preset.","cause":"Conflicting React presets (e.g., @babel/preset-react alongside babel-preset-yoshi with react: true).","error":"Error: Multiple presets attempting to resolve React. Check your Babel config"},{"fix":"Wrap preset options: { \"presets\": [[\"babel-preset-yoshi\", { \"targets\": {...} }]] }","cause":"targets option passed at top level instead of inside preset config.","error":"Error: .babelrc: \"Unknown option: targets\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}