UI5 / UI5/typescript

Support for importing multiple modules from a library with ONE statement

Open
#318 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement types
Dominant language
TypeScript
Stars
213
Forks
35
Avg merge
37m
Merged PRs (30d)
1

Description

Hi,

I just noticed that (control) imports cannot use tree shaking atm.

This means you need to write a very long "import header" like:

import MessageBox from "sap/m/MessageBox";
import Button from "sap/m/Button";
import MessageToast from "sap/m/MessageToast";
import Select from "sap/m/Select";

and cannot simplify write some short and concise code like:

import {MessageBox, Button, MessageToast, Select} from "sap/m";

Are there any plans to support this in the future?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points. Start by locating how control imports are parsed and resolved, then determine how a single library import could expose the named modules while preserving tree shaking. Done means the concise import form works for the shown controls without requiring separate import statements.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.