{"id":26565,"library":"ui5-task-babel-compile","title":"ui5-task-babel-compile","description":"A custom UI5 Tooling task extension that converts JavaScript code to support older browsers using Babel and regenerator-runtime. Version 1.0.6 is stable with no recent updates. It integrates seamlessly into UI5 build pipelines, offering an alternative to manual transpilation setups. Key differentiator: it operates as a UI5 builder extension task, hooking into the build process after the replaceVersion task. Designed for OpenUI5 and SAPUI5 applications targeting legacy browser support. Note: it requires additional Babel configuration (e.g., presets) to function properly.","status":"active","version":"1.0.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","ui5 tooling","ui5","tooling","openui5","sapui5","task","extension","babel"],"install":[{"cmd":"npm install ui5-task-babel-compile","lang":"bash","label":"npm"},{"cmd":"yarn add ui5-task-babel-compile","lang":"bash","label":"yarn"},{"cmd":"pnpm add ui5-task-babel-compile","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Babel compilation; must be installed separately as a peer or direct dependency","package":"babel-core","optional":false},{"reason":"Required for runtime transforms like async/await; must be available in the project","package":"regenerator-runtime","optional":false}],"imports":[{"note":"This is a UI5 task, not a JavaScript module; it's configured in ui5.yaml, not imported in code.","wrong":"importing as a module in JavaScript code","symbol":"ui5-task-babel-compile (task)","correct":"name: ui5-task-babel-compile (in ui5.yaml customTasks)"}],"quickstart":{"code":"// package.json\n{\n  \"name\": \"my-ui5-app\",\n  \"version\": \"1.0.0\",\n  \"devDependencies\": {\n    \"ui5-task-babel-compile\": \"^1.0.6\",\n    \"babel-core\": \"^6.26.3\",\n    \"regenerator-runtime\": \"^0.13.11\"\n  },\n  \"ui5\": {\n    \"dependencies\": [\"ui5-task-babel-compile\"]\n  }\n}\n\n// ui5.yaml\nbuilder:\n  customTasks:\n    - name: ui5-task-babel-compile\n      afterTask: replaceVersion\n      configuration:\n        babelConfig: {\n          presets: [\n            [\"env\", { targets: { browsers: \"> 1%\" } }]\n          ]\n        }","lang":"yaml","description":"Adds the Babel compile task to UI5 build, targeting browsers with >1% global usage."},"warnings":[{"fix":"Use Babel 7 with @babel/core and @babel/preset-env; adjust configuration accordingly.","message":"Babel 6 is outdated; considered deprecated in 2023.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Install babel-core and regenerator-runtime explicitly.","message":"The task requires both babel-core and regenerator-runtime as direct dependencies in the project, not just this package.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Provide a valid babelConfig in ui5.yaml or a .babelrc file in the project root.","message":"The task expects a Babel configuration; if missing, it may fail silently or not transpile anything.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use @babel/plugin-transform-runtime and @babel/runtime instead of regenerator-runtime.","message":"regenerator-runtime is deprecated in favor of @babel/plugin-transform-runtime with @babel/runtime.","severity":"deprecated","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":"npm install babel-core --save-dev","cause":"Missing peer dependency babel-core not installed","error":"Error: Cannot find module 'babel-core'"},{"fix":"npm install regenerator-runtime --save","cause":"Missing runtime dependency for regenerator-runtime","error":"Error: Cannot find module 'regenerator-runtime'"},{"fix":"Add a .babelrc file or babelConfig in ui5.yaml configuration.","cause":"No .babelrc or babelConfig provided in ui5.yaml","error":"Error: Could not find a suitable Babel configuration file"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}