An unofficial Babel plugin for transforming ES6 modules to SAP UI5 module format. Version 7.8.1 is current, with a regular release cadence following UI5 conventions. Key differentiator: it enables using modern ES6 import/export syntax in SAP UI5 projects, converting them to UI5's define() calls. A preset is recommended over direct plugin use. Requires Node >=18 and @babel/core as a peer dependency.
npm install babel-plugin-transform-modules-ui5Verified import paths — ran on the pinned version, not inferred.
Shows how to configure Babel with the plugin, importing the default export.
Upgrade to version 7.x and ensure Node >=10 (now >=18).
Use babel-preset-transform-modules-ui5 instead.
Update Node to >=18 or stay on older plugin version.
Install @babel/core as a devDependency.
Ensure import paths match the UI5 module IDs.
npm install @babel/core --save-dev
Use import syntax in babel.config.js (ESM).
Ensure babel.config.js exports the plugin correctly as [plugin, options].
Install the plugin package and use 'babel-plugin-transform-modules-ui5/preset' (case-sensitive).