Registry / devops / babel-plugin-transform-modules-ui5

babel-plugin-transform-modules-ui5

JSON →
library7.8.1jsnpmunverified

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-ui5
INSTALL
IMPORT
SIG · BABEL-PLUGIN-TRANS
B
babel-plugin-transform-modules-ui5
devopsjavascriptv7.8.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from 'babel-plugin-transform-modules-ui5'
const plugin = require('babel-plugin-transform-modules-ui5')
ESM-only, CommonJS require not supported.
transformModulesUI5
import { transformModulesUI5 } from 'babel-plugin-transform-modules-ui5'
import transformModulesUI5 from 'babel-plugin-transform-modules-ui5'
Named export for advanced usage.
preset
import preset from 'babel-plugin-transform-modules-ui5/preset'
import preset from 'babel-plugin-transform-modules-ui5'
The recommended preset is at a subpath, not the default export.

Shows how to configure Babel with the plugin, importing the default export.

// babel.config.js import plugin from 'babel-plugin-transform-modules-ui5'; export default { plugins: [ [plugin, { // options }] ] };
Debug
Known issues
breakingVersion 7.0.0 dropped support for Node < 10 and Babel 6.
fix
Upgrade to version 7.x and ensure Node >=10 (now >=18).
affects: <7.0.0
deprecatedDirect use of the plugin is deprecated; the preset is recommended.
fix
Use babel-preset-transform-modules-ui5 instead.
affects: >=7.0.0
breakingVersion 7.8.0 requires Node >=18, breaking older Node versions.
fix
Update Node to >=18 or stay on older plugin version.
affects: <7.8.0
gotchaThe plugin must be used with @babel/core as a peer dependency; missing it causes runtime errors.
fix
Install @babel/core as a devDependency.
affects: >=7.0.0
gotchaImport paths in UI5 modules are case-sensitive and must match module names exactly; the plugin does not normalize paths.
fix
Ensure import paths match the UI5 module IDs.
affects: >=7.0.0
Errors
Common errors & fixes
Cannot find module '@babel/core'
@babel/core is missing from node_modules.
fix
npm install @babel/core --save-dev
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using CommonJS require instead of ESM import.
fix
Use import syntax in babel.config.js (ESM).
TypeError: Cannot read properties of undefined (reading 'call')
Incorrect Babel version or plugin not applied as a function.
fix
Ensure babel.config.js exports the plugin correctly as [plugin, options].
Error: The preset 'babel-plugin-transform-modules-ui5/preset' is not found
Preset path is incorrect or package not installed.
fix
Install the plugin package and use 'babel-plugin-transform-modules-ui5/preset' (case-sensitive).
Upgrade
Version history
7.8.1latest on npm
Audit
Dependencies
@babel/corerequiredpeer dependency required for Babel plugin execution
Agent activity
9 hits · last 30 days
node
6
Resources
babel-plugin-transform-modules-ui5 — npm install babel-plugin-transform-modules-ui5 · libregistry