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.

Assessment

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

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.

Description

enhancement types

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?

Dominant language
TypeScript
Stars
213
Forks
35
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from UI5/typescript

All issues in UI5/typescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.