Migration to UI5 Web Components 3.0
This guide will assist you in transitioning from UI5 Web Components version 2.x to UI5 Web Components 3.0.
@ui5/webcomponents-tools
WebdriverIO (WDIO) test support removed
WDIO-based testing has been removed from @ui5/webcomponents-tools. The following are no longer provided:
What to do: Migrate your tests to Cypress Component Testing.
The
@ui5/webcomponents-toolspackage already provides Cypress-based NPS scripts as the replacement:If your project has a
config/wdio.conf.cjsorconfig/wdio.conf.jsfile, remove it — it is no longer read by the tooling.For a complete Cypress setup example see any component package in the monorepo (e.g.
packages/main).
HBS templates, LitRenderer, and hbs2lit/hbs2ui5 removed
Handlebars-based template compilation and the LitRenderer rendering path have been removed. The following are no longer provided:
What to do: Migrate any remaining
.hbstemplates to JSX/TSX usingjsxRenderer.Replace
litRender+ a generated.lit.tstemplate with arender()method in your component class:// Before
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
import MyTemplate from "./generated/templates/MyComponentTemplate.lit.js";
@customElement({ renderer: litRender, template: MyTemplate })
class MyComponent extends UI5Element { }// After
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
@customElement({ renderer: jsxRenderer })
class MyComponent extends UI5Element {
render() {
return <div>{this.text}</div>;
}
}If you were passing
legacy: trueorjsx: truetogetScripts()in yourpackage-scripts.cjs, remove those options. TypeScript support is now controlled via the newtypescriptoption (defaults totrue). Passtypescript: falseonly for pure JavaScript projects.
CSS variable version-scoping removed
CSS custom properties (--ui5-*) are no longer scoped with the package version at build time. Previously, variables were transformed from --ui5-button-color to --ui5-v2-19-0-button-color. This is no longer done.
What to do: No action needed for most projects — CSS variables in your built output will simply use their plain names (e.g.
--ui5-button-color) instead of versioned names.If you were passing
cssVariablesTargettogetScripts()in yourpackage-scripts.cjs, remove it — the option is no longer read.If you relied on versioned variable names for multi-version isolation, you will need to implement an alternative strategy (e.g. CSS layer scoping or shadow DOM containment).
ESLint support removed
The built-in ESLint runner and shared ESLint configuration have been removed from @ui5/webcomponents-tools. The following are no longer provided:
What to do: Set up ESLint directly in your project. Remove any
.eslintrc.cjsfile that extended@ui5/webcomponents-tools/components-package/eslint.js— it is no longer available.For guidance on setting up ESLint with TypeScript support in a web components project, refer to the ESLint documentation and the @typescript-eslint getting started guide.
Package converted to native ESM ("type": "module")
@ui5/webcomponents-tools is now a native ES module package. All files use ESM syntax (import/export) and the package has "type": "module" in its package.json.
package-scripts.cjs must be renamed and converted to ESM
If your package has a package-scripts.cjs file, rename it to package-scripts.js and convert it to ESM syntax:
// Before (package-scripts.cjs — CommonJS)
const getScripts = require("@ui5/webcomponents-tools/components-package/nps.js");
module.exports = { scripts: getScripts({ ... }) };
// After (package-scripts.js — ESM)
import getScripts from "@ui5/webcomponents-tools/components-package/nps.js";
export default { scripts: getScripts({ ... }) };
.mjs entry points renamed to .js
All files that were previously published with a .mjs extension are now .js. If you imported any of these directly (e.g. from lib/css-processors/ or lib/dev-server/), update the extension in your imports.